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/badges.rb')
-rw-r--r--lib/api/badges.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/api/badges.rb b/lib/api/badges.rb
index d7c850c2f40..68095fb2975 100644
--- a/lib/api/badges.rb
+++ b/lib/api/badges.rb
@@ -32,7 +32,7 @@ module API
params do
use :pagination
end
- get ":id/badges" do
+ get ":id/badges", urgency: :default do
source = find_source(source_type, params[:id])
badges = source.badges
@@ -72,7 +72,10 @@ module API
params do
requires :badge_id, type: Integer, desc: 'The badge ID'
end
- get ":id/badges/:badge_id" do
+ # TODO: Set PUT /projects/:id/badges/:badge_id to low urgency and GET to default urgency
+ # after different urgencies are supported for different HTTP verbs.
+ # See https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/1670
+ get ":id/badges/:badge_id", urgency: :low do
source = find_source(source_type, params[:id])
badge = find_badge(source)
@@ -88,7 +91,7 @@ module API
requires :image_url, type: String, desc: 'URL of the badge image'
optional :name, type: String, desc: 'Name for the badge'
end
- post ":id/badges" do
+ post ":id/badges", urgency: :default do
source = find_source_if_admin(source_type)
badge = ::Badges::CreateService.new(declared_params(include_missing: false)).execute(source)