Monstarrrr / rebutify

Where activists improve their advocacy by building, refining and using strong rebuttals to counter the objections to their movement.
https://rebutify.org
9 stars 4 forks source link

Argument reports and suggested edits #259

Open seporterfield opened 4 months ago

seporterfield commented 4 months ago

Write and add tests for the following routes. If they exist already, modify them so they fit our schema.

purple-void commented 3 months ago

Are reports and suggested edits both new ViewSets? @seporterfield

seporterfield commented 3 months ago

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.

purple-void commented 2 months ago

@Monstarrrr what does options mean? we currently have it as a textfield for a report image

Also, if options might be different for each report, then the endpoint arguments/{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) nevermind

Monstarrrr commented 2 months ago

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).

purple-void commented 2 months ago

@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?

This type describes a flag (including close reasons on questions) which could be cast against an object.

Whoever wrote this called them "type". We don't know what "type" means. "type" of object?

Monstarrrr commented 2 months ago

Imo the /arguments/{id}/reports/options should be a list of reporting options such as