format🥚 代码格式化
This commit is contained in:
1 parent
a7cc943b8e
commit
a54d4ba0c1
96 files changed
+143
-151
No files matched your search
@@ -46,4 +46,4 @@ func CreateAction(control dto.Control) gin.HandlerFunc {
|
||||
response.OK(c, object.GetId(), "创建成功")
|
||||
c.Next()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,4 +62,4 @@ func setupSimpleDatabase(host string, c *toolsConfig.Database) {
|
||||
|
||||
sdk.Runtime.SetDb(host, db)
|
||||
sdk.Runtime.SetCasbin(host, e)
|
||||
}
|
||||
}
|
||||
@@ -71,4 +71,4 @@ type Field struct {
|
||||
|
||||
type Style struct {
|
||||
Width string `json:"width"`
|
||||
}
|
||||
}
|
||||
@@ -52,4 +52,4 @@ func (e *ALiYunOSS) UpLoad(yourObjectName string, localFile string) error {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@@ -9,4 +9,4 @@ var (
|
||||
Source string
|
||||
Driver string
|
||||
DBName string
|
||||
)
|
||||
)
|
||||
@@ -4,4 +4,4 @@ const (
|
||||
LoginLog = "login_log_queue"
|
||||
OperateLog = "operate_log_queue"
|
||||
ApiCheck = "api_check_queue"
|
||||
)
|
||||
)
|
||||
@@ -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