mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-14 17:56:16 +01:00
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
|
|
put:
|
||
|
|
tags:
|
||
|
|
- posts
|
||
|
|
summary: vote on a post
|
||
|
|
description: This operation casts a vote on a post.
|
||
|
|
requestBody:
|
||
|
|
required: true
|
||
|
|
content:
|
||
|
|
application/json:
|
||
|
|
schema:
|
||
|
|
type: object
|
||
|
|
properties:
|
||
|
|
delta:
|
||
|
|
type: number
|
||
|
|
description: Positive integer for upvote, negative integer for downvote (0 to unvote.)
|
||
|
|
example:
|
||
|
|
delta: 1
|
||
|
|
responses:
|
||
|
|
'200':
|
||
|
|
description: Post successfully upvoted
|
||
|
|
content:
|
||
|
|
application/json:
|
||
|
|
schema:
|
||
|
|
type: object
|
||
|
|
properties:
|
||
|
|
status:
|
||
|
|
$ref: ../../../components/schemas/Status.yaml#/Status
|
||
|
|
response:
|
||
|
|
type: object
|
||
|
|
properties: {}
|
||
|
|
delete:
|
||
|
|
tags:
|
||
|
|
- posts
|
||
|
|
summary: unvote a post
|
||
|
|
description: This operation removes a pre-cast vote on a post.
|
||
|
|
responses:
|
||
|
|
'200':
|
||
|
|
description: Post successfully unvoted
|
||
|
|
content:
|
||
|
|
application/json:
|
||
|
|
schema:
|
||
|
|
type: object
|
||
|
|
properties:
|
||
|
|
status:
|
||
|
|
$ref: ../../../components/schemas/Status.yaml#/Status
|
||
|
|
response:
|
||
|
|
type: object
|
||
|
|
properties: {}
|