fix 管理员失效BUG

This commit is contained in:
ZJY 2021-09-09 16:24:19 +08:00
parent a85e8e7281
commit 1ccc0b5bf5

View File

@ -13,3 +13,12 @@ func IsUserAdmin(id string) bool {
}
return false
}
func RemoveUserAdmin(id string) bool {
user := &UserAdmin{}
db.Where(Content+" = ?", id).Delete(user)
if len(user.Content) > 0 {
return true
}
return false
}