FIX - Delete Poll Calling itself Bug �

This commit is contained in:
Manik Maity
2024-11-10 15:44:02 +05:30
parent 8207767850
commit 439ba997ab
3 changed files with 25 additions and 3 deletions

View File

@@ -99,6 +99,27 @@ pollRouter.get("/data/:pollId", verifyToken, getPollDataController);
*/
pollRouter.get("/created", verifyToken, getAllCreatedPollsController);
/**
* @swagger
* /poll/delete/{pollId}:
* delete:
* summary: Delete poll
* tags: [Poll]
* parameters:
* - in: path
* name: pollId
* schema:
* type: string
* required: true
* description: Poll ID
* responses:
* 200:
* description: Poll deleted successfully
* 401:
* description: Unauthorized
* 500:
* description: Internal server error
* */
pollRouter.delete("/delete/:pollId", verifyToken, deletePollController);
export default pollRouter;