Closed sweep-ai[bot] closed 1 year ago
UpdateNoteStatus doesn't implement the UpdateNoteStatus method
UpdateNoteStatus doesn't implement the UpdateNoteStatus method
Hi @jreed-Aces,
I decided to make the following changes:
File Path | Proposed Changes |
---|---|
Services/NoteService.cs |
Modify Services/NoteService.cs with contents: • Add the implementation for the UpdateNoteStatus method. The method should take two parameters: an integer id and a Note.Status status .• Inside the method, read the notes from the "notes.json" file into a list of Note objects.• Find the note with the given id using the Find method on the list of notes. If the note is not found, return false.• If the note is found, update its NoteStatus property to the given status .• Write the updated list of notes back to the "notes.json" file. • Return true to indicate that the note's status was successfully updated. |
The NoteStatus property's setter is private, which means it won't work with the new method.
The NoteStatus property's setter is private, which means it won't work with the new method.
Hi @jreed-Aces,
I decided to make the following changes:
File Path | Proposed Changes |
---|---|
Note.cs |
Modify Note.cs with contents: • Change the NoteStatus property to have a public setter. The modified property should look like this: public Status NoteStatus { get; set; } |
Description
This PR adds a new status field to the Note class, updates the NoteService to handle note status updates, and modifies the commands in the Program class to support updating and printing notes based on their status.
Summary of Changes
Please review and merge this PR to add the requested functionality.
Fixes #26.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.