更新示例

This commit is contained in:
ryan
2026-06-10 15:11:42 +08:00
parent 57944398e6
commit 15b3c83625
11 changed files with 378 additions and 270 deletions
+17
View File
@@ -0,0 +1,17 @@
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
package router
import (
"github.com/Rain-kl/Wavelet/internal/apps/custom"
"github.com/gin-gonic/gin"
)
// registerCustomRoutes registers custom business routes to keep router.go clean and stable.
func registerCustomRoutes(apiV1Router *gin.RouterGroup) {
customRouter := apiV1Router.Group("/custom")
{
customRouter.GET("/hello", custom.Hello)
}
}
+3
View File
@@ -280,6 +280,9 @@ func registerRoutes(r *gin.Engine) {
adminRouter.PUT("/auth-sources/:id/toggle", admin_auth_source.ToggleAuthSource)
adminRouter.DELETE("/auth-sources/:id", admin_auth_source.DeleteAuthSource)
}
// Register custom business routes
registerCustomRoutes(apiV1Router)
}
}