mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-08 00:26:37 +08:00
perf: skill
This commit is contained in:
@@ -8,7 +8,9 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// RegisterCustomRootRoutes registers custom business routes that belong to the root path.
|
||||
// RegisterCustomRootRoutes is a scaffold SAMPLE placeholder for root-path routes
|
||||
// (webhooks, short links). Prefer semantic paths and/or a dedicated root file;
|
||||
// do not treat this as the only place for all product APIs. See skill new-api.
|
||||
func RegisterCustomRootRoutes(_ *gin.Engine) {
|
||||
// Add custom root routes here
|
||||
// Sample only — add root-path demos here if needed
|
||||
}
|
||||
|
||||
@@ -9,7 +9,9 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// RegisterCustomRoutes registers custom business routes to keep routing clean and stable.
|
||||
// RegisterCustomRoutes is a scaffold SAMPLE only (demo: GET /api/v1/custom/hello).
|
||||
// Real product APIs belong in apps/<domain>/ with semantic paths and a dedicated
|
||||
// Register*Routes file (e.g. channel.go), not piled into this package. See skill new-api.
|
||||
func RegisterCustomRoutes(apiV1Router *gin.RouterGroup) {
|
||||
customRouter := apiV1Router.Group("/custom")
|
||||
{
|
||||
|
||||
@@ -16,6 +16,7 @@ func RegisterV1Routes(apiV1Router *gin.RouterGroup, apiGroup *gin.RouterGroup) {
|
||||
// 2. Admin routes
|
||||
RegisterAdminRoutes(apiV1Router)
|
||||
|
||||
// 3. Register custom business routes
|
||||
// 3. Product domain routes: RegisterXxxRoutes(apiV1Router) — see skill new-api
|
||||
// 4. Scaffold sample only (optional demo under /api/v1/custom)
|
||||
RegisterCustomRoutes(apiV1Router)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user