diff options
author | Julian Jørgensen <julian@jtle.dk> | 2024-05-24 21:30:23 +0200 |
---|---|---|
committer | Julian Jørgensen <julian@jtle.dk> | 2024-05-24 21:30:23 +0200 |
commit | 2f83424ce8a0653e6e158318df1511daecf1a42d (patch) | |
tree | b29c1b5c8df940873521d013697209195956151e /page.go | |
parent | 19f8454a680c5231df68fee36ed9758587df316c (diff) |
Time format rework
Diffstat (limited to 'page.go')
-rw-r--r-- | page.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -5,14 +5,14 @@ type Service struct { } type EntryPage struct { - Task *Task + Entry *Entry Detached bool - Tracking *Task + Tracking *Entry } type RootPage struct { Entry *EntryPage - Tasks []*Task + Entries []*Entry } func NewService(db Database) *Service { @@ -21,20 +21,20 @@ func NewService(db Database) *Service { } } -func (srv *Service) GetEntryPage(detached *Task) (*EntryPage, error) { +func (srv *Service) GetEntryPage(detached *Entry) (*EntryPage, error) { tracking, err := srv.Db.GetTracking() if err != nil { return nil, err } page := &EntryPage { - Task: tracking, + Entry: tracking, Detached: false, Tracking: tracking, } if detached != nil { - page.Task = detached + page.Entry = detached page.Detached = true } @@ -54,6 +54,6 @@ func (srv *Service) GetRootPage() (*RootPage, error) { return &RootPage { Entry: entry, - Tasks: tasks, + Entries: tasks, }, nil } |