Remove no-longer-needed REST endpoints
Some checks failed
/ build-container (push) Has been cancelled
Some checks failed
/ build-container (push) Has been cancelled
This commit is contained in:
parent
a5433beca0
commit
22cafb347b
13 changed files with 22 additions and 828 deletions
|
@ -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,
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue