feat: 实现数据库备份与恢复

This commit is contained in:
kanzihuang
2023-12-27 22:59:20 +08:00
committed by wanli
parent 1a7d425f60
commit e344722794
92 changed files with 5997 additions and 69 deletions

View File

@@ -102,7 +102,7 @@ func (a *LdapLogin) getOrCreateUserWithLdap(userName string, password string, co
}
account, err := a.getUser(userName, cols...)
if err == gorm.ErrRecordNotFound {
if errors.Is(err, gorm.ErrRecordNotFound) {
a.createUser(userName, userInfo.DisplayName)
return a.getUser(userName, cols...)
} else if err != nil {