Changed output

This commit is contained in:
マリウス 2020-10-11 21:15:05 +01:00
parent 5181dbdf1a
commit 2ed8a411e9
No known key found for this signature in database
GPG key ID: C228EF0A530AF06F

View file

@ -22,13 +22,23 @@ var trackCmd = &cobra.Command{
} }
newEntry, err := NewEntry("", begin, finish, project, task, user) newEntry, err := NewEntry("", begin, finish, project, task, user)
database.AddEntry(newEntry, true)
entries, err := database.ListEntries()
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
fmt.Printf("%+v", entries) entryId, err := database.AddEntry(user, newEntry, true)
if err != nil {
log.Fatal(err)
}
// entries, err := database.ListEntries()
// if err != nil {
// log.Fatal(err)
// }
// fmt.Printf("%+v", entries)
log.Printf("Added new entry with ID %s!\n", entryId)
return
}, },
} }