refactor(router): extract route registration into helper methods

This commit is contained in:
ryan
2026-06-13 16:27:08 +08:00
parent 922f764241
commit 5698169f20
6 changed files with 253 additions and 228 deletions
+32 -32
View File
@@ -100,6 +100,38 @@
}
}
},
"/api/health": {
"get": {
"description": "检查服务是否正常运行,可用于负载均衡存活探测",
"produces": [
"application/json"
],
"tags": [
"health"
],
"summary": "健康检查",
"responses": {
"200": {
"description": "服务正常",
"schema": {
"allOf": [
{
"$ref": "#/definitions/util.ResponseAny"
},
{
"type": "object",
"properties": {
"data": {
"type": "string"
}
}
}
]
}
}
}
}
},
"/api/v1/admin/auth-sources": {
"get": {
"security": [
@@ -3419,38 +3451,6 @@
}
}
},
"/api/v1/health": {
"get": {
"description": "检查服务是否正常运行,可用于负载均衡存活探测",
"produces": [
"application/json"
],
"tags": [
"health"
],
"summary": "健康检查",
"responses": {
"200": {
"description": "服务正常",
"schema": {
"allOf": [
{
"$ref": "#/definitions/util.ResponseAny"
},
{
"type": "object",
"properties": {
"data": {
"type": "string"
}
}
}
]
}
}
}
}
},
"/api/v1/oauth/callback": {
"post": {
"description": "接收前端传回的 state 和 code,完成 OAuth/OIDC 认证并建立会话。支持登录(login)和账号绑定(bind)两种场景。",