mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-02 23:06:36 +08:00
e50e600bc8
- Updated `new-api` skill `SKILL.md` to document the centralized v1.go route registration and domain-driven sub-routing patterns - Updated `AGENTS.md` instructions with the new router subpackages (`root`, `v1`) and route file layout guidelines
22 lines
562 B
Go
22 lines
562 B
Go
// Copyright 2026 Arctel.net
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
// Package v1 contains router registrations for API V1
|
|
package v1
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// RegisterV1Routes registers all routes under API V1.
|
|
func RegisterV1Routes(apiV1Router *gin.RouterGroup, apiGroup *gin.RouterGroup) {
|
|
// 1. User & Public routes (OAuth, User, Upload, CAPTCHA, Health, Config)
|
|
RegisterUserRoutes(apiV1Router, apiGroup)
|
|
|
|
// 2. Admin routes
|
|
RegisterAdminRoutes(apiV1Router)
|
|
|
|
// 3. Register custom business routes
|
|
RegisterCustomRoutes(apiV1Router)
|
|
}
|