初始化流程整体优化,前端报错锁死的情况提供登出操作

This commit is contained in:
pixel
2021-06-17 15:54:32 +08:00
parent da0d5d2413
commit b99fe53c6b
3 changed files with 90 additions and 123 deletions

View File

@@ -26,7 +26,8 @@ func JsonInBlacklist(jwtList model.JwtBlacklist) (err error) {
//@return: bool
func IsBlacklist(jwt string) bool {
isNotFound := errors.Is(global.GVA_DB.Where("jwt = ?", jwt).First(&model.JwtBlacklist{}).Error, gorm.ErrRecordNotFound)
err := global.GVA_DB.Where("jwt = ?", jwt).First(&model.JwtBlacklist{}).Error
isNotFound := errors.Is(err, gorm.ErrRecordNotFound)
return !isNotFound
}