更新指定更新XXX账号指令 开放ptkey过期提醒
This commit is contained in:
parent
1a1d187c1d
commit
89af831d10
@ -1,7 +1,5 @@
|
||||
package models
|
||||
|
||||
import "github.com/beego/beego/v2/core/logs"
|
||||
|
||||
type UserAdmin struct {
|
||||
ID int
|
||||
Content string `gorm:"unique"`
|
||||
@ -9,7 +7,9 @@ type UserAdmin struct {
|
||||
|
||||
func IsUserAdmin(id string) bool {
|
||||
user := UserAdmin{}
|
||||
logs.Info(id)
|
||||
db.Model(user).Where(Content+" = ?", id).First(user)
|
||||
db.Where(Content+" = ?", id).First(user)
|
||||
if len(user.Content) > 0 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user