Accept JSON in Admin::BroadcastMessagesController

What does this MR do and why?

Related issue: #368847 (closed)

As the broadcast messages page is converted to a Vue app, we'll want to have JSON endpoints available for create and update. This MR adds support for JSON requests in addition to the existing HTML requests.

I also separated the feature pushing into a before action, as it will be needed for both the index and edit pages

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading