pollmelo / backberry

fruity backend for pollmelo
2 stars 0 forks source link

Create and set routing 'add'-Method to PollController #16

Closed martincodes-de closed 1 year ago

martincodes-de commented 1 year ago

Before this issue can be solved, #15 must be solved and merged into develop.

To save some polls, we need a http-api endpoint to save some.

Write a add-Method into the PollController that creates and returns the created poll as json. The url should be api/polls/create.

Write also some tests for this endpoint. (see below)

The URL should be only accessible with POST-method. (See below)

We don't need a validation / error handling at this moment. It would be a follow-up issue.

The HTTP-Response code should be, if successful, 201. (see below)

Interesting resources: