diff --git a/internal/web/admin.go b/internal/web/admin.go index c637511..3632252 100644 --- a/internal/web/admin.go +++ b/internal/web/admin.go @@ -101,7 +101,7 @@ func adminUserDelete(ctx echo.Context) error { } addFlash(ctx, "User has been deleted", "success") - return redirect(ctx, "/admin/users") + return redirect(ctx, "/admin-panel/users") } func adminGistDelete(ctx echo.Context) error { @@ -119,7 +119,7 @@ func adminGistDelete(ctx echo.Context) error { } addFlash(ctx, "Gist has been deleted", "success") - return redirect(ctx, "/admin/gists") + return redirect(ctx, "/admin-panel/gists") } func adminSyncReposFromFS(ctx echo.Context) error { @@ -148,7 +148,7 @@ func adminSyncReposFromFS(ctx echo.Context) error { } syncReposFromFS = false }() - return redirect(ctx, "/admin") + return redirect(ctx, "/admin-panel") } func adminSyncReposFromDB(ctx echo.Context) error { @@ -180,5 +180,5 @@ func adminSyncReposFromDB(ctx echo.Context) error { syncReposFromDB = false return }() - return redirect(ctx, "/admin") + return redirect(ctx, "/admin-panel") } diff --git a/internal/web/run.go b/internal/web/run.go index 1d66e64..5958179 100644 --- a/internal/web/run.go +++ b/internal/web/run.go @@ -173,7 +173,7 @@ func Start() { g1.POST("/settings/ssh-keys", sshKeysProcess, logged) g1.DELETE("/settings/ssh-keys/:id", sshKeysDelete, logged) - g2 := g1.Group("/admin") + g2 := g1.Group("/admin-panel") { g2.Use(adminPermission) g2.GET("", adminIndex) diff --git a/internal/web/util.go b/internal/web/util.go index d78a89d..714f959 100644 --- a/internal/web/util.go +++ b/internal/web/util.go @@ -148,7 +148,7 @@ func validateReservedKeywords(fl validator.FieldLevel) bool { name := fl.Field().String() restrictedNames := map[string]struct{}{} - for _, restrictedName := range []string{"assets", "register", "login", "logout", "config", "admin", "all"} { + for _, restrictedName := range []string{"assets", "register", "login", "logout", "config", "admin-panel", "all"} { restrictedNames[restrictedName] = struct{}{} } diff --git a/templates/base/admin_header.html b/templates/base/admin_header.html index d7be0b2..598a7cc 100644 --- a/templates/base/admin_header.html +++ b/templates/base/admin_header.html @@ -9,11 +9,11 @@