update
This commit is contained in:
@ -27,15 +27,26 @@ func NewSSG(opt Options) *gin.Engine {
|
||||
r.Use(ssgLogger())
|
||||
r.Use(middleware.SSGToken(opt.Config.Server.SSGToken))
|
||||
|
||||
ssg := r.Group("/api/v1/ssg")
|
||||
// 内部契约:不复用公开的 /api/v1 前缀,一眼可辨「这是构建期专用接口」。
|
||||
// 旧前缀 /api/v1/ssg 在下方注册为别名,便于旧构建脚本过渡。
|
||||
ssg := r.Group("/api/internal/ssg")
|
||||
{
|
||||
ssg.GET("/brands/hot", opt.SSG.HotBrands) // 走秀页热门品牌(前 30,热度顺序)
|
||||
ssg.GET("/index/runway", opt.SSG.IndexRunway) // 首页(/index/)runway 区块:多模块,当前含 hotBrand
|
||||
ssg.GET("/brands/popular", opt.SSG.HotBrands) // 走秀页热门品牌(前 30,热度顺序)
|
||||
ssg.GET("/home/runway", opt.SSG.IndexRunway) // 首页 runway 区块:多模块,当前含 hotBrand
|
||||
ssg.GET("/street-snaps/popular", opt.SSG.StreetSnapPopular) // 首页热门街拍(按图片数前 20)
|
||||
// 注:/street-snaps/ids(全部街拍编码 id 枚举)已移除——街拍详情页走 /item/[id] 按需 SSR,
|
||||
// 无需构建期枚举 id。handler/service/repository 对应实现已一并删除。
|
||||
}
|
||||
|
||||
// deprecated: 旧 SSG 前缀与路径名(/api/v1/ssg、/index/runway、/brands/hot)
|
||||
legacy := r.Group("/api/v1/ssg")
|
||||
{
|
||||
legacy.GET("/brands/hot", opt.SSG.HotBrands)
|
||||
legacy.GET("/brands/popular", opt.SSG.HotBrands)
|
||||
legacy.GET("/index/runway", opt.SSG.IndexRunway)
|
||||
legacy.GET("/street-snaps/popular", opt.SSG.StreetSnapPopular)
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user