format🥚 代码格式化
This commit is contained in:
1 parent
a7cc943b8e
commit
a54d4ba0c1
96 files changed
+143
-151
No files matched your search
@@ -177,4 +177,4 @@ func Unauthorized(c *gin.Context, code int, message string) {
|
||||
"code": code,
|
||||
"msg": message,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ func LoggerToFile() gin.HandlerFunc {
|
||||
}
|
||||
rb, _ := ioutil.ReadAll(bf)
|
||||
c.Request.Body = ioutil.NopCloser(bytes.NewBuffer(rb))
|
||||
body =string(rb)
|
||||
body = string(rb)
|
||||
}
|
||||
|
||||
c.Next()
|
||||
@@ -53,7 +53,6 @@ func LoggerToFile() gin.HandlerFunc {
|
||||
if c.Request.Method == http.MethodOptions {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
rt, bl := c.Get("result")
|
||||
var result = ""
|
||||
@@ -129,4 +128,4 @@ func SetDBOperLog(c *gin.Context, clientIP string, statusCode int, reqUri string
|
||||
log.Errorf("Append message error, %s", err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/go-admin-team/go-admin-core/sdk/pkg/response"
|
||||
)
|
||||
|
||||
//权限检查中间件
|
||||
// AuthCheckRole 权限检查中间件
|
||||
func AuthCheckRole() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
log := api.GetRequestLogger(c)
|
||||
|
||||
Reference in new issue
Block a user