新增问诊订单详情。修改错误码格式
This commit is contained in:
@@ -18,7 +18,7 @@ func Jwt() gin.HandlerFunc {
|
||||
if authorization == "" || !strings.HasPrefix(authorization, "Bearer ") {
|
||||
c.JSON(http.StatusUnauthorized, gin.H{
|
||||
"message": "请求未授权",
|
||||
"code": consts.TOKEN_ERROR,
|
||||
"code": consts.TokenError,
|
||||
"data": "",
|
||||
})
|
||||
c.Abort()
|
||||
@@ -35,7 +35,7 @@ func Jwt() gin.HandlerFunc {
|
||||
if res != "" {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "token错误/过期",
|
||||
"code": consts.TOKEN_ERROR,
|
||||
"code": consts.TokenError,
|
||||
"data": "",
|
||||
})
|
||||
|
||||
@@ -48,7 +48,7 @@ func Jwt() gin.HandlerFunc {
|
||||
if err != nil {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "token错误/过期",
|
||||
"code": consts.TOKEN_ERROR,
|
||||
"code": consts.TokenError,
|
||||
"data": "",
|
||||
})
|
||||
|
||||
@@ -61,7 +61,7 @@ func Jwt() gin.HandlerFunc {
|
||||
if err != nil {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "token错误",
|
||||
"code": consts.TOKEN_ERROR,
|
||||
"code": consts.TokenError,
|
||||
"data": "",
|
||||
})
|
||||
|
||||
@@ -73,7 +73,7 @@ func Jwt() gin.HandlerFunc {
|
||||
if err != nil {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "token错误",
|
||||
"code": consts.TOKEN_ERROR,
|
||||
"code": consts.TokenError,
|
||||
"data": "",
|
||||
})
|
||||
|
||||
@@ -85,7 +85,7 @@ func Jwt() gin.HandlerFunc {
|
||||
if err != nil {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "token错误",
|
||||
"code": consts.TOKEN_ERROR,
|
||||
"code": consts.TokenError,
|
||||
"data": "",
|
||||
})
|
||||
|
||||
@@ -97,7 +97,7 @@ func Jwt() gin.HandlerFunc {
|
||||
if err != nil {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "token错误",
|
||||
"code": consts.TOKEN_ERROR,
|
||||
"code": consts.TokenError,
|
||||
"data": "",
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user