更改路由前缀

This commit is contained in:
lianghuanjie
2024-12-13 18:16:23 +08:00
parent f9084a0eb3
commit b93614f0df
3 changed files with 5 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
syntax = "v1" syntax = "v1"
@server ( @server (
prefix: /api/task/v1 prefix: /gapi/task/v1
group: task group: task
jwt: Auth jwt: Auth
) )

View File

@@ -15,7 +15,7 @@
"application/json" "application/json"
], ],
"paths": { "paths": {
"/api/task/v1/reward/{id}": { "/gapi/task/v1/reward/{id}": {
"get": { "get": {
"summary": "领取任务奖励", "summary": "领取任务奖励",
"operationId": "GetTaskReward", "operationId": "GetTaskReward",
@@ -45,7 +45,7 @@
] ]
} }
}, },
"/api/task/v1/task/{id}": { "/gapi/task/v1/task/{id}": {
"get": { "get": {
"summary": "校验任务结果", "summary": "校验任务结果",
"operationId": "VerifyTaskResult", "operationId": "VerifyTaskResult",
@@ -75,7 +75,7 @@
] ]
} }
}, },
"/api/task/v1/tasks": { "/gapi/task/v1/tasks": {
"get": { "get": {
"summary": "获取任务列表", "summary": "获取任务列表",
"operationId": "GetTaskList", "operationId": "GetTaskList",

View File

@@ -35,6 +35,6 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
}, },
}, },
rest.WithJwt(serverCtx.Config.Auth.AccessSecret), rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
rest.WithPrefix("/api/task/v1"), rest.WithPrefix("/gapi/task/v1"),
) )
} }