Page MenuHomePhabricator

Create API route to get rejected statements for logged in user
Closed, ResolvedPublicFeature

Description

Feature summary:
New API route to retrieve an array of statements which have been rejected by the currently logged in user.

Method: GET only
Suggested url: api/get-rejected-statements
Request data: file
Returns: JSON (array of depict items)

When making the API call, you only need to provide the file because the user_id will come from the currently logged in user.
The back end should then query the Suggestions table for all rows with matching file and user_id.
We only need to return the depict_item from the database. So example results would look like this if the user had rejected 3 different suggestions on the file specified:

["Q123", "Q345", "Q678]

Use case(s):
The front end needs to check which suggestions have been rejected by the logged in user, so they can be filtered out of the list displayed.

Event Timeline

Change 826940 had a related patch set uploaded (by Eugene233; author: Eugene233):

[labs/tools/Isa@master] Create API route to get rejected statements for logged in user

https://gerrit.wikimedia.org/r/826940

Change 826940 merged by jenkins-bot:

[labs/tools/Isa@master] Create API route to get rejected statements for logged in user

https://gerrit.wikimedia.org/r/826940

NavinoEvans moved this task from Review to Merged on the ISA board.