-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement update endpoint for Files
, Nodes
, Notes
, Reminders
and Timelines
module
#43
base: main
Are you sure you want to change the base?
Implement update endpoint for Files
, Nodes
, Notes
, Reminders
and Timelines
module
#43
Conversation
…gs from `Reminder` module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should not be mandatory for the user to send all the entity information in order to update the entity. For example, sending this should also work and it should update only the title:
{
"Note": {
"Id": "74dad71c-4ddc-4d4d-a894-3307ddc3fe10",
"Title": "This title was AGAIN updated from Postman."
}
}
At the moment I am getting the validation error which makes no sense. I can think of a possible solution, but will give you time to come up with your own one first.
@@ -1,6 +1,6 @@ | |||
namespace Notes.Application.Entities.Notes.Commands.UpdateNote; | |||
|
|||
public record UpdateNoteCommand(NoteDto Note) : ICommand<UpdateNoteResult>; | |||
public record UpdateNoteCommand(UpdateNoteDto Note) : ICommand<UpdateNoteResult>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I had in mind... Sort of 😄 As it is here, the command serves simply as a wrapper around the UpdateNoteDto
type, and that DTO is again used here and only here.
Do you have an idea on what a better solution would be?
.../src/Modules/Notes/Notes.Application/Entities/Notes/Commands/UpdateNote/UpdateNoteHandler.cs
Show resolved
Hide resolved
.../src/Modules/Notes/Notes.Application/Entities/Notes/Commands/UpdateNote/UpdateNoteHandler.cs
Show resolved
Hide resolved
…ps://github.com/NikolaVetnic/Timelines into feat/implement-update-endpoint-for-all-entities
In this PR I did the following things:
Files
,Nodes
,Notes
,Reminders
andTimelines
moduleId
field for every update commandPUT
endpoint for:Files
moduleNodes
moduleNotes
moduleReminders
moduleTimelines
module