Update Note - piotrpdev/notes-app GitHub Wiki
Instructions
To update a note in the system, select option 3 in the menu and fill out details about the note.
You will initially be shown a list of all the notes in the system, at this point you will have to enter the index of the note you wish to update.
After you make a choice, you will be asked for the following new details:
NOTE: You can simply press enter when asked for a new value, this will keep the old value.
- Title - The title of the note.
- Priority - The priority of the note, where 1 is the lowest and 5 is the highest priority (inclusive).
- Category - The category of the note.
- isNoteArchived - A flag indicating whether the note is archived or not.
These will be filled out automatically in the background:
- updatedAt - The date and time the note was last updated, defaulting to the current date and time.
- createdAt - The date and time the note was created, defaulting to the current date and time.
Outcomes
If everything works successfully, you will be given a confirmation and shown the updated note.
If something goes wrong (when you enter an invalid value for example), you will be prompted to enter a correct value.