token 简化
This commit is contained in:
@@ -36,6 +36,13 @@ func InitDefault(config *viper.Viper) {
|
||||
}
|
||||
}
|
||||
|
||||
func ParseToken(token string) (user_id int) {
|
||||
if err := db.Table("web_auth").Select("user_id").Where("token = ?", token).Scan(&user_id).Error; err != nil {
|
||||
fmt.Println("token解析失败", err)
|
||||
}
|
||||
return user_id
|
||||
}
|
||||
|
||||
// 定时检查补全颜色字段
|
||||
func CheckColorNullRows(offset int) {
|
||||
for {
|
||||
|
Reference in New Issue
Block a user