Skip to content

Move newsletter test function to rest endpoint

Alex requested to merge newsletter-xhr-to-rest into master

What does this MR do?

I'm trying to move more functions from xhr to Rest so that we have a more modern Api and it might be easier to replace UI by vue components. This moves the newsletter test function from ?app=email&m=testmail to /api/newsletter/test in a new NewsletterRestController.

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

Quite sure, works locally. This only changes the network transfer, the actual sending of the test mail is not affected.

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 orga
  3. Go to /?page=email
  4. In the 'Newsletter Testen' field: enter an invalid address and click send -> an error should appear
  5. Send a valid address -> a confirmation message should appear

Checklist

  • added a test, or explain why one is not needed/possible...
  • no unrelated changes
  • asked someone for a code review
  • joined #foodsharing-beta channel at https://slackin.yunity.org
  • added an entry to CHANGELOG.md (description, merge request link, username(s))
  • Once your MR has been merged, you are responsible to update the #foodsharing-beta Slack channel about what has been changed here. They will test your work in different browsers, roles or other settings
Edited by Alex

Merge request reports