Skip to content

Move removal of store requests to REST endpoint

Alex requested to merge refactor-store-requests into master

What does this MR do?

One further step in cleaning up the code:

  • moves the function that denies or withdraws store requests to a new REST endpoint and removes the old XHR (#798 (closed))
  • removes the correponding function in StoreModel and uses the gateway and transaction classes instead (#9 (closed))

How confident are you it won't break things if deployed?

Quite but not perfectly sure. Needs some testing when reviewing it.

How to test

Steps a reviewer can take to verify that this MR does what it says it does e.g.

  1. Checkout branch locally
  2. Login as foodsaver
  3. Go to a store on the map and send a request
  4. Withdraw the request
  5. Check if you can send a new request

and

  1. Checkout branch locally
  2. Login as foodsaver
  3. Go to a store on the map and send a request
  4. Login as ambassador
  5. Go to the store for which you sent the request (e.g. via the bell)
  6. Deny the request
  7. Login as foodsaver again
  8. Check if you have a bell notification

Checklist

  • added a test, or explain why one is not needed/possible... should still be covered by the existing tests
  • no unrelated changes
  • asked someone for a code review
  • set a "for:" label to indicate who will be affected by this change
  • use "state:" labels to track this MR's state until it was beta tested
  • added an entry to CHANGELOG.md
  • add a short text that can be used in the release notes (not necessary for refactoring)
  • Once your MR has been merged, you are responsible to create a testing issue in Beta Testing Repo:
    • Consider writing a detailed description in German.
    • Describe in a few sentences, what should be tested from a user perspective.
    • Also mention different settings (e.g. different browsers, roles, ...). how this change can be tested.
    • Be aware, that also non technical people should understand.

Merge request reports