Im not entirely sure what you mean here, could you tell me what method you are exactly referring to? If we want to create or update todos, we can use Springs save methods in the service/repository. It will check if the entry already exists and then either update the entry or create a new one.
My fault. I overlooked, that there has to be the id in the request. I thought because the constructor holds no id and it is already part of the URL it wouldn't make sense to send it with the body.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
One other thing. The update method, is just another create. It is quite impossible to update ToDos, if there are only getters. Is that intended?
Im not entirely sure what you mean here, could you tell me what method you are exactly referring to? If we want to create or update todos, we can use Springs save methods in the service/repository. It will check if the entry already exists and then either update the entry or create a new one.
My fault. I overlooked, that there has to be the id in the request. I thought because the constructor holds no
id
and it is already part of the URL it wouldn't make sense to send it with the body.