Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/broadcast_messages.rb')
-rw-r--r--lib/api/broadcast_messages.rb20
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