Skip to content

Commit

Permalink
fix(cmd/note): entries not being saved after adding notes
Browse files Browse the repository at this point in the history
  • Loading branch information
deadpyxel committed Oct 31, 2023
1 parent 782c91a commit 4ec34b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/note.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ func addNoteToCurrentDay(cmd *cobra.Command, args []string) error {
return fmt.Errorf("Could not find any entry for the current day.")
}
journalEntries[idx].Notes = append(journalEntries[idx].Notes, newNote)
err = journal.SaveEntries(journalEntries)
if err != nil {
return err
}
fmt.Println("Successfully added new note to current day.")
return nil
}
Expand Down

0 comments on commit 4ec34b4

Please sign in to comment.