diff options
Diffstat (limited to 'lib/api/error_tracking_client_keys.rb')
-rw-r--r-- | lib/api/error_tracking_client_keys.rb | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/lib/api/error_tracking_client_keys.rb b/lib/api/error_tracking_client_keys.rb deleted file mode 100644 index eaa84b7186c..00000000000 --- a/lib/api/error_tracking_client_keys.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -module API - class ErrorTrackingClientKeys < ::API::Base - before { authenticate! } - - feature_category :error_tracking - - params do - requires :id, type: String, desc: 'The ID of a project' - end - - resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do - segment ':id/error_tracking' do - before do - authorize! :admin_operations, user_project - end - - desc 'List all client keys' do - detail 'This feature was introduced in GitLab 14.3.' - success Entities::ErrorTracking::ClientKey - end - get '/client_keys' do - collection = user_project.error_tracking_client_keys - - present paginate(collection), with: Entities::ErrorTracking::ClientKey - end - - desc 'Create a client key' do - detail 'This feature was introduced in GitLab 14.3.' - success Entities::ErrorTracking::ClientKey - end - post '/client_keys' do - key = user_project.error_tracking_client_keys.create! - - present key, with: Entities::ErrorTracking::ClientKey - end - - desc 'Delete a client key' do - detail 'This feature was introduced in GitLab 14.3.' - success Entities::ErrorTracking::ClientKey - end - delete '/client_keys/:key_id' do - key = user_project.error_tracking_client_keys.find(params[:key_id]) - key.destroy! - end - end - end - end -end |