调整路由以符合 RESTful 规范,新增 API Token 撤销功能

This commit is contained in:
2026-01-14 10:13:57 +08:00
parent 9c10dfd496
commit 5160ae78cc
10 changed files with 658 additions and 536 deletions

View File

@@ -9,13 +9,14 @@ type Response struct {
// 错误码定义
const (
CodeSuccess = 200
CodeBadRequest = 400
CodeUnauthorized = 401
CodeForbidden = 403
CodeNotFound = 404
CodeGone = 410
CodeInternalError = 500
CodeSuccess = 200
CodeBadRequest = 400
CodeUnauthorized = 401
CodeForbidden = 403
CodeNotFound = 404
CodeGone = 410
CodeInternalError = 500
CodeTooManyRequests = 429
)
// NewResponse 创建响应