增加基础设置页面

This commit is contained in:
2026-07-29 16:45:22 +08:00
parent 0b22d4f126
commit a9a890a849
15 changed files with 472 additions and 84 deletions
+5 -1
View File
@@ -95,7 +95,7 @@ func SetupRoutes(r *gin.Engine, cfg interface{}) {
admin.DELETE("/pages/:id", handlers.DeletePage)
// 评论管理
admin.GET("/admin/comments", handlers.GetComments)
admin.GET("/comments", handlers.GetComments)
admin.PUT("/comments/:id/approve", handlers.ApproveComment)
admin.PUT("/comments/:id/spam", handlers.MarkSpamComment)
admin.DELETE("/comments/:id", handlers.DeleteComment)
@@ -107,6 +107,10 @@ func SetupRoutes(r *gin.Engine, cfg interface{}) {
admin.PUT("/users/:id/password", handlers.AdminResetPassword)
admin.DELETE("/users/:id", handlers.DeleteUser)
// 基础设置
admin.GET("/settings", handlers.GetSettings)
admin.PUT("/settings", handlers.UpdateSettings)
// 文件管理(图片上传)
admin.POST("/upload", handlers.UploadImage)
admin.GET("/uploads", handlers.ListUploads)