mirror of
https://github.com/thomiceli/opengist.git
synced 2025-06-17 15:47:13 +02:00
Better UI for admin settings (#30)
This commit is contained in:
@ -185,6 +185,14 @@ func adminSyncReposFromDB(ctx echo.Context) error {
|
||||
return redirect(ctx, "/admin-panel")
|
||||
}
|
||||
|
||||
func adminSettings(ctx echo.Context) error {
|
||||
setData(ctx, "title", "Admin Settings")
|
||||
setData(ctx, "htmlTitle", "Admin Settings - Admin panel")
|
||||
setData(ctx, "adminHeaderPage", "settings")
|
||||
|
||||
return html(ctx, "admin_settings.html")
|
||||
}
|
||||
|
||||
func adminSetSetting(ctx echo.Context) error {
|
||||
key := ctx.FormValue("key")
|
||||
value := ctx.FormValue("value")
|
||||
|
@ -188,6 +188,7 @@ func Start() {
|
||||
g2.POST("/gists/:gist/delete", adminGistDelete)
|
||||
g2.POST("/sync-fs", adminSyncReposFromFS)
|
||||
g2.POST("/sync-db", adminSyncReposFromDB)
|
||||
g2.GET("/settings", adminSettings)
|
||||
g2.PUT("/set-setting", adminSetSetting)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user