feat(webui): add sessions expiration
All checks were successful
main / main (push) Successful in 2m37s
main / deploy (push) Has been skipped
main / publish (push) Has been skipped

Closes #28
This commit is contained in:
Julien Dessaux 2025-04-18 23:26:38 +02:00
parent d40595cacb
commit 215c630ba0
Signed by: adyxax
GPG key ID: F92E51B86E07177E
3 changed files with 10 additions and 4 deletions

View file

@ -17,6 +17,6 @@ type Session struct {
}
func (session *Session) IsExpired() bool {
// TODO
return false
expires := session.Created.Add(12 * time.Hour) // 12 hours sessions
return time.Now().After(expires)
}