refactor(api): separate Yggdrasil routes from v1 API group
Move Yggdrasil API endpoints from /api/v1/yggdrasil to /api/yggdrasil for better route organization and compatibility with standard Yggdrasil protocol. Also upgrade Go to 1.25, update dependencies, and migrate email package from jordan-wright/email to gopkg.in/mail.v2. Remove deprecated UUID design plan.
This commit is contained in:
@@ -52,7 +52,8 @@ func RegisterRoutesWithDI(router *gin.Engine, c *container.Container) {
|
||||
h := NewHandlers(c)
|
||||
|
||||
// API路由组
|
||||
v1 := router.Group("/api/v1")
|
||||
apiGroup := router.Group("/api")
|
||||
v1 := apiGroup.Group("/v1")
|
||||
{
|
||||
// 认证路由(无需JWT)
|
||||
registerAuthRoutes(v1, h.Auth)
|
||||
@@ -69,15 +70,16 @@ func RegisterRoutesWithDI(router *gin.Engine, c *container.Container) {
|
||||
// 验证码路由
|
||||
registerCaptchaRoutesWithDI(v1, h.Captcha)
|
||||
|
||||
// Yggdrasil API路由组
|
||||
registerYggdrasilRoutesWithDI(v1, h.Yggdrasil)
|
||||
|
||||
// CustomSkinAPI 路由
|
||||
registerCustomSkinRoutes(v1, h.CustomSkin)
|
||||
|
||||
// 管理员路由(需要管理员权限)
|
||||
registerAdminRoutes(v1, c, h.Admin)
|
||||
}
|
||||
|
||||
// Yggdrasil API路由组(独立于v1,路径为 /api/yggdrasil)
|
||||
|
||||
registerYggdrasilRoutesWithDI(apiGroup, h.Yggdrasil)
|
||||
}
|
||||
|
||||
// registerAuthRoutes 注册认证路由
|
||||
|
||||
Reference in New Issue
Block a user