Commit 7b557c83 authored by David O'Regan's avatar David O'Regan Committed by Bob Van Landuyt

Update Editor team endpoint custom thresholds

Set a low urgency for a selection
of the editor team endpoints as
per our new custom threshold guidelines.
parent 91a42f8a
......@@ -18,6 +18,8 @@ class IdeController < ApplicationController
feature_category :web_ide
urgency :low
def index
Gitlab::UsageDataCounters::WebIdeCounter.increment_views_count
end
......
......@@ -18,6 +18,8 @@ class Projects::SnippetsController < Projects::Snippets::ApplicationController
push_frontend_feature_flag(:improved_emoji_picker, @project, default_enabled: :yaml)
end
urgency :low, [:index]
def index
@snippet_counts = ::Snippets::CountService
.new(current_user, project: @project)
......
......@@ -5,6 +5,8 @@ class Projects::WebIdeSchemasController < Projects::ApplicationController
feature_category :web_ide
urgency :low
def show
return respond_422 unless branch_sha
......
......@@ -2,6 +2,7 @@
class Snippets::BlobsController < Snippets::ApplicationController
include Snippets::BlobsActions
urgency :low
skip_before_action :authenticate_user!, only: [:raw]
end
......@@ -38,7 +38,7 @@ module API
params do
use :pagination
end
get ":id/snippets" do
get ":id/snippets", urgency: :low do
authenticate!
present paginate(snippets_for_current_user), with: Entities::ProjectSnippet, current_user: current_user
......
......@@ -184,7 +184,7 @@ module API
params do
use :raw_file_params
end
get ":id/files/:ref/:file_path/raw", requirements: { file_path: API::NO_SLASH_URL_PART_REGEX } do
get ":id/files/:ref/:file_path/raw", urgency: :low, requirements: { file_path: API::NO_SLASH_URL_PART_REGEX } do
snippet = snippets.find_by_id(params.delete(:id))
not_found!('Snippet') unless snippet&.repo_exists?
......
......@@ -48,7 +48,7 @@ module API
optional :version, type: String, desc: 'The version hash of a wiki page'
optional :render_html, type: Boolean, default: false, desc: 'Render content to HTML'
end
get ':id/wikis/:slug' do
get ':id/wikis/:slug', urgency: :low do
authorize! :read_wiki, container
present wiki_page(params[:version]), with: Entities::WikiPage, render_html: params[:render_html]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment