1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-18 00:40:24 +08:00

finish 试卷查重

This commit is contained in:
源文雨
2023-04-17 22:35:54 +08:00
parent 67b6abf001
commit e2a8cdf5b3
13 changed files with 475 additions and 34 deletions

View File

@@ -97,7 +97,9 @@ type loginResult struct {
}
var (
usertokens = ttl.NewCache[string, *global.User](time.Hour)
usertokens = ttl.NewCacheOn(time.Hour, [4]func(string, *global.User){
nil, nil, func(t string, _ *global.User) { loginstatus.Delete(t) }, nil,
})
)
func login(username, challenge string) (*loginResult, error) {