From fd994ce631ce7244157f81678574e6bc420d0fcc Mon Sep 17 00:00:00 2001 From: sanine-a Date: Wed, 10 May 2023 12:18:57 -0500 Subject: implement user logins and gatekeeping --- db/session.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'db/session.go') 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( -- cgit v1.2.1