mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-05 04:56:37 +08:00
feat: make user limit configurable from admin user management (#18)
Store the per-instance user cap in settings (default 20) and expose GET/PUT /admin/users/limit endpoints. The user management page now lets admins view and update the limit without touching system settings. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: truewhile <truewhile@users.noreply.github.com>
This commit is contained in:
@@ -102,6 +102,8 @@ func registerAdminStrmRoutes(admin *gin.RouterGroup, svc *service.Container) {
|
||||
}
|
||||
|
||||
func registerAdminUserRoutes(admin *gin.RouterGroup, svc *service.Container) {
|
||||
admin.GET("/users/limit", getUserLimitHandler(svc))
|
||||
admin.PUT("/users/limit", updateUserLimitHandler(svc))
|
||||
admin.GET("/users", listUsersHandler(svc))
|
||||
admin.POST("/users", createUserHandler(svc))
|
||||
admin.PATCH("/users/:id", updateUserHandler(svc))
|
||||
|
||||
Reference in New Issue
Block a user