fix 管理员失效BUG
This commit is contained in:
parent
a85e8e7281
commit
1ccc0b5bf5
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user