fix: updating a poll should return the poll, not an array

pull/17/head
Dominique Merle 4 years ago
parent 4cd2fd1375
commit 5c20b56d82

@ -7,7 +7,7 @@ parameters:
format: int64 format: int64
get: get:
operationId: get-poll operationId: get-poll
summary: Gets a poll by ID summary: Gets a poll by ID.
responses: responses:
'200': '200':
description: OK description: OK
@ -19,7 +19,7 @@ get:
$ref: ../components/responses/poll-not-found.yaml $ref: ../components/responses/poll-not-found.yaml
patch: patch:
operationId: update-poll operationId: update-poll
summary: Updates a poll summary: Updates a poll.
requestBody: requestBody:
required: true required: true
content: content:
@ -31,19 +31,23 @@ patch:
- pollAuth: [] - pollAuth: []
responses: responses:
'200': '200':
description: OK description: Poll was updated.
content: content:
application/json: application/json:
schema: schema:
type: array $ref: ../components/schemas/poll.yaml
items: '404':
$ref: ../components/schemas/poll.yaml $ref: ../components/responses/poll-not-found.yaml
delete: delete:
operationId: delete-poll operationId: delete-poll
summary: Deletes a poll summary: Deletes a poll.
description: >
All the Poll data will be permanently erased.
This includes all the corollary models (Tally, Ballots, …)
Only the Poll's author may delete it. (and wild admins)
responses: responses:
'200': '200':
description: OK description: Poll was deleted.
'404': '404':
$ref: ../components/responses/poll-not-found.yaml $ref: ../components/responses/poll-not-found.yaml
security: security:

Loading…
Cancel
Save