Skip to content

Move bell requests to REST

Alex requested to merge 935-bells-rest into master

Part of #798 (closed), can help with #935 (closed)

What does this MR do?

Moves all XHR requests for bells to nre REST endpoints:

  • GET /api/bells returns the bell list for the infobar (with pagination)
  • DELETE /api/bells/{id} deletes a bell
  • PATCH /api/bells marks a list of bells as read

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

Quite sure, seems to work. I added unit tests.

How to test

Create some bells, e.g.:

  1. Login as user2
  2. Go to the map
  3. Select a store and click "I would like to help" -> this creates a bell for userbot

Test the bells:

  1. Login as userbot
  2. See if the unread bell appears in the infobar
  3. Click on the bell -> you will be redirected
  4. The bell should now be marked as read
  5. Delete the bell
  6. Reload the page -> the bell should be gone

Checklist

  • added a test, or explain why one is not needed/possible...
  • 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
  • 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.
Edited by Alex

Merge request reports