Implement vote call for OCS controller
Open, Needs TriagePublic

Description

With the re-addition of OCS authentication in attica/knewstuff through kaccounts in mind, we'll be wanting to reenable the ability for people to vote on content. To do this, the content/vote call would want to accept the following data, only when authorised:

POST to (server)/v1/content/vote/(content ID)
with the following POST variable
vote=(some integer from 0 to 100, in line with the interpretation in T11142[1])

Currently it returns a 405 response, which would then instead become an unauthorised response for any caller which does not supply supported authentication data.

[1] Votes sent out by the old knewstuff widget system (still in widespread use) are in increments of 10, and so it would make sense to support the full integer range 0-100. Especially it would make sense to let people send a vote of 0 to signal removal of their rating (since that is the interpretation of that number also found in T11142).

leinir created this task.Oct 15 2019, 8:52 AM