summaryrefslogtreecommitdiff
path: root/lib/api/internal.rb
diff options
context:
space:
mode:
authorMike Ricketts <rickettm@uk.ibm.com>2017-06-15 13:47:33 +0000
committerRémy Coutable <remy@rymai.me>2017-06-15 13:47:33 +0000
commit03b2ac659e43f39a4c6e646d0dbb5bd0a973cc38 (patch)
tree4d22335d7a35486280f063525540615f2add0a19 /lib/api/internal.rb
parent039c375372f76050c48d6e5c39bb8322c8bf7dc5 (diff)
downloadgitlab-ce-03b2ac659e43f39a4c6e646d0dbb5bd0a973cc38.tar.gz
#13336 - display multiple messages in both the UI and git output
Diffstat (limited to 'lib/api/internal.rb')
-rw-r--r--lib/api/internal.rb10
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
{}