feat(token): 添加Token存在性检查
This commit is contained in:
10
db/local.go
10
db/local.go
@@ -32,6 +32,16 @@ start:
|
||||
}
|
||||
}
|
||||
|
||||
func CheckToken(token string) bool {
|
||||
InitLocalDB()
|
||||
for _, t := range localDB {
|
||||
if t.Token == token {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func ListToken() []Token {
|
||||
InitLocalDB()
|
||||
return localDB
|
||||
|
Reference in New Issue
Block a user