Deleting a Poll

This is an API to delete the poll. The app sends a pollId to be deleted and receives a generic success message on successful deletion of the poll. This API needs to take care of the fact that the user who is deleting the poll should be the one who created it in the first place. The following code block shows the fragment from the swagger documentation:

 "/polls/{pollId}":{     "delete":{        "tags":[           "Name"      ],      "summary":"Gets a single poll by Id",      "description":"Deletes a Poll\n",      "produces":[           "application/json"      ],      "parameters":[           {              "name":"pollId",            "in":"path",            "required":true,            "type":"string"         }      ],      "responses":{           "200":{              "description":"200 response",            "schema":{                 "$ref":"#/definitions/APISuccessResponseWithMessage" ...

Get Hands-On Serverless Applications with Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.