mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-30 12:20:38 +01:00
40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
get:
|
|
tags:
|
|
- posts
|
|
summary: get voters of a post
|
|
description: This returns the upvoters and downvoters of a post if the user has permission to view them
|
|
parameters:
|
|
- in: path
|
|
name: pid
|
|
schema:
|
|
type: string
|
|
required: true
|
|
description: a valid post id
|
|
example: 2
|
|
responses:
|
|
'200':
|
|
description: Data about upvoters and downvoters of the post
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
status:
|
|
$ref: ../../../components/schemas/Status.yaml#/Status
|
|
response:
|
|
type: object
|
|
properties:
|
|
upvoteCount:
|
|
type: number
|
|
downvoteCount:
|
|
type: number
|
|
showUpvotes:
|
|
type: boolean
|
|
showDownvotes:
|
|
type: boolean
|
|
upvoters:
|
|
type: array
|
|
downvoters:
|
|
type: array
|
|
|