feat: SSR 站点单页 /page/:slug 与 Admin CRUD

EOF

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-29 16:49:39 +08:00
parent c4faba81b3
commit 802f86605c
17 changed files with 410 additions and 8 deletions

View File

@@ -76,6 +76,8 @@ func Setup(cfg *config.Config) (*gin.Engine, error) {
}
}()
sitePageSvc := services.NewSitePageService(filter)
h := &api.Handlers{
Cfg: cfg, Store: uploadStore, Auth: authSvc, User: userSvc, Board: boardSvc,
Post: postSvc, Comment: commentSvc, Message: messageSvc, Notify: notifySvc, Report: reportSvc,
@@ -84,7 +86,7 @@ func Setup(cfg *config.Config) (*gin.Engine, error) {
Captcha: captchaSvc, Mail: mailSvc, EmailCode: emailCodeSvc,
OIDC: oidcSvc, Gitea: giteaSvc,
Points: services.NewPointsService(), Badge: services.NewBadgeService(),
SitePage: services.NewSitePageService(filter),
SitePage: sitePageSvc,
FriendLinkApply: friendLinkApplySvc,
}
authMW := auth.NewAuthMiddleware(authSvc)
@@ -103,6 +105,7 @@ func Setup(cfg *config.Config) (*gin.Engine, error) {
Points: services.NewPointsService(),
FriendLink: friendLinkApplySvc,
Mail: mailSvc,
SitePage: sitePageSvc,
}, authMW)
r.GET("/media/thumb/*filepath", h.ServeImageThumb)