diff options
Diffstat (limited to 'lib/api/internal.rb')
-rw-r--r-- | lib/api/internal.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb index 38631953014..ecd6d672cf7 100644 --- a/lib/api/internal.rb +++ b/lib/api/internal.rb @@ -86,8 +86,16 @@ module API } end + get "/broadcast_messages" do + if messages = BroadcastMessage.current + present messages, with: Entities::BroadcastMessage + else + [] + end + end + get "/broadcast_message" do - if message = BroadcastMessage.current + if message = BroadcastMessage.current.last present message, with: Entities::BroadcastMessage else {} |