fix issues

This commit is contained in:
rogee
2023-02-07 00:39:13 +08:00
parent 032cfbc283
commit ed3e7e3bbf
2 changed files with 3 additions and 7 deletions

View File

@@ -11,6 +11,7 @@ import (
_ "atom/providers/jwt"
_ "atom/providers/log"
_ "atom/providers/query"
_ "atom/providers/rbac"
_ "atom/providers/single_flight"
_ "atom/providers/uuid"
)

View File

@@ -31,13 +31,8 @@ type CasbinInfo struct {
Method string `json:"method"` // 方法
}
func NewCasbin(
query *query.Query,
db *gorm.DB,
) (IRbac, error) {
cb := &Casbin{
query: query,
}
func NewCasbin(query *query.Query, db *gorm.DB) (IRbac, error) {
cb := &Casbin{query: query}
a, _ := gormadapter.NewAdapterByDB(db)
text := `