diff options
author | sanine-a <sanine.not@pm.me> | 2023-05-10 12:18:57 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2023-05-10 12:18:57 -0500 |
commit | fd994ce631ce7244157f81678574e6bc420d0fcc (patch) | |
tree | aa1bac1a1419dc83588d2895ae54f5c8a3da8283 /db/session.go | |
parent | facfe2b26f1ce8cbc125f7f1192d2e0d65c51ae9 (diff) |
implement user logins and gatekeeping
Diffstat (limited to 'db/session.go')
-rw-r--r-- | db/session.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/db/session.go b/db/session.go index 8590d2f..da081f9 100644 --- a/db/session.go +++ b/db/session.go @@ -90,6 +90,13 @@ func (p *Phlox) CheckSession(session Session) (bool, error) { } + +func (p *Phlox) CheckSessionId(id string) (bool, error) { + session := Session{ Id: id } + return p.CheckSession(session) +} + + func (p *Phlox) TouchSession(session Session) error { now := time.Now().UTC().Format(time.RFC3339) _, err := p.db.Exec( |