mantisbt-plugins / Announce

Announcements plugin for MantisBT, lets privileged accounts create and post announcements that can be shown to users on a global or per-project basis, and allow users to dismiss individual messages.
MIT License
20 stars 14 forks source link

Use REST API instead of XmlHttpRequest #22

Closed dregad closed 6 years ago

dregad commented 6 years ago

XHR was deprecated in Mantis 2.3.0.

Publish REST API endpoints to replace the corresponding XHR functions:

Fixes #21

dregad commented 6 years ago

Thanks for your review. I changed to a POST route, and refactored the code to return different status codes but no actual content. Let me know what you think about this approach.

dregad commented 6 years ago

Rebased and refactored the 2nd AJAX call (add context) to use REST also; fixed a PHP notice and removed deprecated synchronous AJAX call.

dregad commented 6 years ago

@vboctor your feedback on the latest changes (new REST API endpoint to add context) would be appreciated