rename routes to make more sense
for example, /getInvite and /generateInvite become GET(/invites) and
POST(/invites) respectively.
This commit is contained in:
@@ -455,34 +455,34 @@ func start(asDaemon, firstCall bool) {
|
||||
router.GET("/invite/:invCode", app.InviteProxy)
|
||||
api := router.Group("/", app.webAuth())
|
||||
router.POST("/logout", app.Logout)
|
||||
api.POST("/newUserAdmin", app.NewUserAdmin)
|
||||
api.POST("/generateInvite", app.GenerateInvite)
|
||||
api.GET("/getInvites", app.GetInvites)
|
||||
api.GET("/getProfiles", app.GetProfiles)
|
||||
api.POST("/setProfile", app.SetProfile)
|
||||
api.POST("/setDefaultProfile", app.SetDefaultProfile)
|
||||
api.POST("/createProfile", app.CreateProfile)
|
||||
api.POST("/deleteProfile", app.DeleteProfile)
|
||||
api.POST("/setNotify", app.SetNotify)
|
||||
api.POST("/deleteInvite", app.DeleteInvite)
|
||||
api.POST("/deleteUser", app.DeleteUser)
|
||||
api.GET("/getUsers", app.GetUsers)
|
||||
api.POST("/modifyEmails", app.ModifyEmails)
|
||||
api.DELETE("/users", app.DeleteUser)
|
||||
api.GET("/users", app.GetUsers)
|
||||
api.POST("/users", app.NewUserAdmin)
|
||||
api.POST("/invites", app.GenerateInvite)
|
||||
api.GET("/invites", app.GetInvites)
|
||||
api.DELETE("/invites", app.DeleteInvite)
|
||||
api.POST("/invites/profile", app.SetProfile)
|
||||
api.GET("/profiles", app.GetProfiles)
|
||||
api.POST("/profiles/default", app.SetDefaultProfile)
|
||||
api.POST("/profiles", app.CreateProfile)
|
||||
api.DELETE("/profiles", app.DeleteProfile)
|
||||
api.POST("/invites/notify", app.SetNotify)
|
||||
api.POST("/users/emails", app.ModifyEmails)
|
||||
// api.POST("/setDefaults", app.SetDefaults)
|
||||
api.POST("/applySettings", app.ApplySettings)
|
||||
api.GET("/getConfig", app.GetConfig)
|
||||
api.POST("/modifyConfig", app.ModifyConfig)
|
||||
api.POST("/users/settings", app.ApplySettings)
|
||||
api.GET("/config", app.GetConfig)
|
||||
api.POST("/config", app.ModifyConfig)
|
||||
if app.config.Section("ombi").Key("enabled").MustBool(false) {
|
||||
api.GET("/getOmbiUsers", app.OmbiUsers)
|
||||
api.POST("/setOmbiDefaults", app.SetOmbiDefaults)
|
||||
api.GET("/ombi/users", app.OmbiUsers)
|
||||
api.POST("/ombi/defaults", app.SetOmbiDefaults)
|
||||
}
|
||||
app.info.Printf("Starting router @ %s", address)
|
||||
} else {
|
||||
router.GET("/", func(gc *gin.Context) {
|
||||
gc.HTML(200, "setup.html", gin.H{})
|
||||
})
|
||||
router.POST("/testJF", app.TestJF)
|
||||
router.POST("/modifyConfig", app.ModifyConfig)
|
||||
router.POST("/jellyfin/test", app.TestJF)
|
||||
router.POST("/config", app.ModifyConfig)
|
||||
app.info.Printf("Loading setup @ %s", address)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user