refactor, move route loading to router.go

This commit is contained in:
Harvey Tindall
2021-02-02 18:09:02 +00:00
parent aaed272bf2
commit ea99966057
9 changed files with 301 additions and 344 deletions

3
api.go
View File

@@ -1330,6 +1330,9 @@ func (app *appContext) GetLanguages(gc *gin.Context) {
gc.JSON(200, resp)
}
// @Summary Restarts the program. No response means success.
// @Router /restart [post]
// @tags Other
func (app *appContext) restart(gc *gin.Context) {
app.info.Println("Restarting...")
err := app.Restart()