I have the following PATCH request:
http://localhost:3000/tasks/566-344334-3321/status
.
The handler for this request is written as:
@Patch('/:id/status')
updateTaskStatus() { // implementation here
return "got through";
}
I am struggling to grasp the workings of the stem part and how the appropriate handler is mapped to process the request.
For instance, in /566-344334-3321/status
The id section is /566-344334-3321 which is variable.
However, the fixed suffix /status
must be precise.
Any deviation results in an error message: "error": "Not Found"
.
What explains this behavior?