We need a /polls/:poll_id route that update a poll with new data.
It's expected to receive a PATCH request along with the user token (in the request header) and all attributes that will be changed, then respond with a status code depending on the outcome.
PATCH - /polls/:poll_id
Request:
header: {
"token": string
}
body: {
"attr1": new_value,
"attr2": new_value,
...
}
Response:
Status Ok or Error
We need a
/polls/:poll_id
route that update a poll with new data.It's expected to receive a PATCH request along with the user token (in the request header) and all attributes that will be changed, then respond with a status code depending on the outcome.