From 4ec34b4cc46e5d361934663291fdcc7ef2c41e59 Mon Sep 17 00:00:00 2001 From: Robson Cruz Date: Tue, 31 Oct 2023 18:18:31 -0300 Subject: [PATCH] fix(cmd/note): entries not being saved after adding notes --- cmd/note.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/note.go b/cmd/note.go index afbd33f..b4a8c29 100644 --- a/cmd/note.go +++ b/cmd/note.go @@ -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 }