fix: casbin gorm-adapter has no sqlite3 support

Signed-off-by: closetool <c299999999@qq.com>
This commit is contained in:
closetool
2021-04-04 21:42:22 +08:00
parent 4faa807c53
commit 146b0b2925
33 changed files with 229 additions and 240 deletions
+2 -3
View File
@@ -10,7 +10,6 @@ import (
"gorm.io/gorm"
)
//@author: [piexlmax](https://github.com/piexlmax)
//@function: Register
//@description: 用户注册
@@ -125,8 +124,8 @@ func FindUserById(id int) (err error, user *model.SysUser) {
func FindUserByUuid(uuid string) (err error, user *model.SysUser) {
var u model.SysUser
if err = global.GVA_DB.Where("`uuid` = ?", uuid).First(&u).Error; err != nil{
if err = global.GVA_DB.Where("`uuid` = ?", uuid).First(&u).Error; err != nil {
return errors.New("用户不存在"), &u
}
return nil, &u
}
}