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 votes #257

Open seporterfield opened 3 months ago

seporterfield commented 3 months ago

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

blocked by #293

seporterfield commented 3 months ago

@ndharmateja all yours

ndharmateja commented 3 months ago

@Monstarrrr what should be the response body for these routes?

ndharmateja commented 3 months ago

@Monstarrrr also I am unable to move this issue to "In Progress" is it because of permissions? 🤔

ndharmateja commented 3 months ago

@seporterfield @Monstarrrr @purple-void should the following edge cases be considered?

  1. upvote argument
    • when the argument is already upvoted, should an error be raised?
  2. upvote argument undo
    • if the existing vote is "downvote", what should be done?
    • if no vote between the user and argument exists, what should be done?
Monstarrrr commented 3 months ago

@Monstarrrr what should be the response body for these routes?

I am in the process of building the Mock API which will contain the response format i'm looking for.
I will let you know asap.
If an issue is blocked by an other it may be a good idea to add ''blocked by #[issue_number]" in the issue body to help with keeping track of dependencies.

Monstarrrr commented 3 months ago

@seporterfield @Monstarrrr @purple-void should the following edge cases be considered?

  1. upvote argument
    • when the argument is already upvoted, should an error be raised?
  2. upvote argument undo
    • if the existing vote is "downvote", what should be done?
    • if no vote between the user and argument exists, what should be done?
  1. In theory i'll make sure an upvote cast can't happen if the item is already upvoted, because clicking this upvote will trigger a /undo, in practice if it were to happen for whatever reason then we'd expect an error

  2. If existing vote is a downvote then there is no upvote to undo, so likewise such a call would return an error

  3. If no vote exists then there can't be votes to undo, so this is an error too

Let me know if I that makes sense to you too

ndharmateja commented 3 months ago

@Monstarrrr what should be the response body for these routes?

I am in the process of building the Mock API which will contain the response format i'm looking for. I will let you know asap. If an issue is blocked by an other it may be a good idea to add ''blocked by #[issue_number]" in the issue body to help with keeping track of dependencies.

okay great I will code everything else except for the response bodies.

I also added the blocked by.

ndharmateja commented 3 months ago

@seporterfield @Monstarrrr @purple-void should the following edge cases be considered?

  1. upvote argument

    • when the argument is already upvoted, should an error be raised?
  2. upvote argument undo

    • if the existing vote is "downvote", what should be done?
    • if no vote between the user and argument exists, what should be done?
  1. In theory i'll make sure an upvote cast can't happen if the item is already upvoted, because clicking this upvote will trigger a /undo, in practice if it were to happen for whatever reason then we'd expect an error
  2. If existing vote is a downvote then there is no upvote to undo, so likewise such a call would return an error
  3. If no vote exists then there can't be votes to undo, so this is an error too

Let me know if I that makes sense to you too

yes definitely makes sense 👍🏼

Monstarrrr commented 3 months ago

In general you can assume that anything not explicitly planned is an error, kind of like the API equivalent of the https://csrc.nist.rip/glossary/term/deny_by_default approach