mirror of
https://github.com/thomiceli/opengist.git
synced 2025-07-12 19:01:50 +02:00
Create admin settings and moved signup disable setting there
This commit is contained in:
@ -182,3 +182,16 @@ func adminSyncReposFromDB(ctx echo.Context) error {
|
||||
}()
|
||||
return redirect(ctx, "/admin-panel")
|
||||
}
|
||||
|
||||
func adminSetSetting(ctx echo.Context) error {
|
||||
key := ctx.FormValue("key")
|
||||
value := ctx.FormValue("value")
|
||||
|
||||
if err := models.UpdateSetting(key, value); err != nil {
|
||||
return errorRes(500, "Cannot set setting", err)
|
||||
}
|
||||
|
||||
return ctx.JSON(200, map[string]interface{}{
|
||||
"success": true,
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user