Closed qwqcode closed 1 month ago
Attention: Patch coverage is 0%
with 70 lines
in your changes missing coverage. Please review.
Project coverage is 32.16%. Comparing base (
abac3f0
) to head (9046996
). Report is 5 commits behind head on master.
Files with missing lines | Patch % | Lines |
---|---|---|
server/handler/vote.go | 0.00% | 66 Missing :warning: |
internal/dao/query_find.go | 0.00% | 3 Missing :warning: |
server/server.go | 0.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The original
POST /votes/:type/:target_id
endpoint for creating votes has been updated toPOST /votes/:target_name/:target_id/:choice
. Thetarget_name
can be eithercomment
orpage
, thetarget_id
is a numeric value, and thechoice
can beup
ordown
. (https://artalk.js.org/http-api.html#tag/Vote/operation/CreateVote)The HTTP response now includes two additional fields:
is_up
andis_down
, which indicate the user's current voting state. Theup
anddown
fields remain unchanged and continue to be of numeric type, ensuring backward compatibility with existing clients.is_up
andis_down
properties to vote response{target_name}
and{choice}
up
anddown
choicesBREAKING CHANGE: Vote HTTP API endpoint have been updated. (See #997)
This is a prerequisite PR for #983.