From 2f83424ce8a0653e6e158318df1511daecf1a42d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20J=C3=B8rgensen?= Date: Fri, 24 May 2024 21:30:23 +0200 Subject: Time format rework --- page.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'page.go') diff --git a/page.go b/page.go index 384ca57..c3ab160 100644 --- a/page.go +++ b/page.go @@ -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 } -- cgit v1.2.3