新增问诊订单详情。修改错误码格式
This commit is contained in:
@@ -128,7 +128,7 @@ func Auth() gin.HandlerFunc {
|
||||
} else {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "请求路径错误",
|
||||
"code": consts.SERVER_ERROR,
|
||||
"code": consts.ServerError,
|
||||
"data": "",
|
||||
})
|
||||
|
||||
@@ -147,7 +147,7 @@ func Auth() gin.HandlerFunc {
|
||||
if len(adminApis) == 0 || err != nil {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "请求路径错误",
|
||||
"code": consts.SERVER_ERROR,
|
||||
"code": consts.ServerError,
|
||||
"data": "",
|
||||
})
|
||||
c.Abort()
|
||||
@@ -168,7 +168,7 @@ func Auth() gin.HandlerFunc {
|
||||
if adminRoleMenu == nil {
|
||||
c.JSON(http.StatusForbidden, gin.H{
|
||||
"message": "暂无权限",
|
||||
"code": consts.CLIENT_HTTP_UNAUTHORIZED,
|
||||
"code": consts.ClientHttpUnauthorized,
|
||||
"data": "",
|
||||
})
|
||||
c.Abort()
|
||||
@@ -197,7 +197,7 @@ func Auth() gin.HandlerFunc {
|
||||
if !hasPermission {
|
||||
c.JSON(http.StatusForbidden, gin.H{
|
||||
"message": "暂无权限",
|
||||
"code": consts.CLIENT_HTTP_UNAUTHORIZED,
|
||||
"code": consts.ClientHttpUnauthorized,
|
||||
"data": "",
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user