增加用户管理

This commit is contained in:
2026-07-28 18:02:05 +08:00
parent 21be62fa7c
commit 0b22d4f126
10 changed files with 822 additions and 8 deletions
+7
View File
@@ -100,6 +100,13 @@ func SetupRoutes(r *gin.Engine, cfg interface{}) {
admin.PUT("/comments/:id/spam", handlers.MarkSpamComment)
admin.DELETE("/comments/:id", handlers.DeleteComment)
// 用户管理
admin.GET("/users", handlers.GetUsers)
admin.POST("/users", handlers.CreateUser)
admin.PUT("/users/:id", handlers.AdminUpdateUser)
admin.PUT("/users/:id/password", handlers.AdminResetPassword)
admin.DELETE("/users/:id", handlers.DeleteUser)
// 文件管理(图片上传)
admin.POST("/upload", handlers.UploadImage)
admin.GET("/uploads", handlers.ListUploads)