Open seporterfield opened 4 months ago
Are reports and suggested edits both new ViewSets? @seporterfield
Whatever works and only creates the routes we need.
I'd recommend APIViews but you can use ViewSets if you use mixins to restrict the allowed HTTP methods.
@Monstarrrr what does options mean? we currently have it as a textfield for a report
Also, if options might be different for each report, then the endpoint
nevermindarguments/{id}/reports/options
doesn't make sense. Getting the options from a specific report would make sense: arguments/{id}/reports/{id}/options
, unless if there can be only one report for each argument. (We'll notify the whole team first if changing the endpoint makes sense)
It comes from the stackexchange API, this is a more detailed description:
https://api.stackexchange.com/docs/answer-flag-options
Returns the different flags that the user identified with an access_token can create for the answer identified by {id}. Available flags vary from post to post and user to user, an app should never assume a particular flag can be created without consulting this method.
Note that I renamed flag
to be report
in our case.
I suppose what you have in mind is an endpoint that I haven't made but that we'll need, it's the endpoint to retrieve the reports that a given post received.
Either way I will add it now GET /arguments/{id}/reports
(admin only).
@seporterfield @ndharmateja pinging you both because @Monstarrrr's adding an endpoint.
for @Monstarrrr:
it's the endpoint to retrieve the reports that a given post received.
we were talking something else
what are options? are they custom objects?
Whoever wrote this called them "type". We don't know what "type" means. "type" of object?
Imo the /arguments/{id}/reports/options
should be a list of reporting options such as
Write and add tests for the following routes. If they exist already, modify them so they fit our schema.