Remove no-longer-needed REST endpoints
Some checks failed
/ build-container (push) Has been cancelled

This commit is contained in:
Finn 2024-04-24 00:15:12 -07:00
parent a5433beca0
commit 22cafb347b
13 changed files with 22 additions and 828 deletions

View file

@ -1,10 +0,0 @@
package db
import "git.janky.solutions/finn/lockserver/openapi"
func (l LockCodeSlot) OpenAPI() openapi.LockCodeSlot {
return openapi.LockCodeSlot{
Code: l.Code,
Enabled: l.Enabled,
}
}

View file

@ -1,27 +0,0 @@
package db
import (
"time"
"git.janky.solutions/finn/lockserver/openapi"
)
func (u GetAllUserCodesRow) OpenAPI() openapi.UserCode {
resp := openapi.UserCode{Code: &u.Code}
if u.Name.Valid {
resp.User = &u.Name.String
}
if u.Start.Valid {
start := u.Start.Time.Format(time.RFC3339)
resp.Starts = &start
}
if u.End.Valid {
end := u.End.Time.Format(time.RFC3339)
resp.Ends = &end
}
return resp
}