diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-12 03:07:34 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-12 03:07:34 +0000 |
commit | 2ccde70b80730fd52f75797e7d711748fb5b769b (patch) | |
tree | bb5b1c2dfa4f99381eabcb0f7783e55d9fad073d /lib/api/broadcast_messages.rb | |
parent | 2e3cbf7d89815e2915f77677388c49b48f8d20c3 (diff) | |
download | gitlab-ce-2ccde70b80730fd52f75797e7d711748fb5b769b.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/broadcast_messages.rb')
-rw-r--r-- | lib/api/broadcast_messages.rb | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/api/broadcast_messages.rb b/lib/api/broadcast_messages.rb index 19148758fc5..994e12445b7 100644 --- a/lib/api/broadcast_messages.rb +++ b/lib/api/broadcast_messages.rb @@ -32,11 +32,12 @@ module API success Entities::BroadcastMessage end params do - requires :message, type: String, desc: 'Message to display' + requires :message, type: String, desc: 'Message to display' optional :starts_at, type: DateTime, desc: 'Starting time', default: -> { Time.zone.now } - optional :ends_at, type: DateTime, desc: 'Ending time', default: -> { 1.hour.from_now } - optional :color, type: String, desc: 'Background color' - optional :font, type: String, desc: 'Foreground color' + optional :ends_at, type: DateTime, desc: 'Ending time', default: -> { 1.hour.from_now } + optional :color, type: String, desc: 'Background color' + optional :font, type: String, desc: 'Foreground color' + optional :target_path, type: String, desc: 'Target path' end post do message = BroadcastMessage.create(declared_params(include_missing: false)) @@ -66,12 +67,13 @@ module API success Entities::BroadcastMessage end params do - requires :id, type: Integer, desc: 'Broadcast message ID' - optional :message, type: String, desc: 'Message to display' + requires :id, type: Integer, desc: 'Broadcast message ID' + optional :message, type: String, desc: 'Message to display' optional :starts_at, type: DateTime, desc: 'Starting time' - optional :ends_at, type: DateTime, desc: 'Ending time' - optional :color, type: String, desc: 'Background color' - optional :font, type: String, desc: 'Foreground color' + optional :ends_at, type: DateTime, desc: 'Ending time' + optional :color, type: String, desc: 'Background color' + optional :font, type: String, desc: 'Foreground color' + optional :target_path, type: String, desc: 'Target path' end put ':id' do message = find_message |