mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-16 10:00:25 +08:00
使用数据库存储管理员和用户登录SESSION
This commit is contained in:
7
internal/db/models/login_session_model_ext.go
Normal file
7
internal/db/models/login_session_model_ext.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
func (this *LoginSession) IsAvailable() bool {
|
||||
return this.ExpiresAt == 0 || int64(this.ExpiresAt) > time.Now().Unix()
|
||||
}
|
||||
Reference in New Issue
Block a user