调整路由以符合 RESTful 规范,新增 API Token 撤销功能
This commit is contained in:
@@ -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 创建响应
|
||||
|
||||
Reference in New Issue
Block a user