Commit c96d40aa authored by raju249's avatar raju249

Add api for sentry error tracking settings

parent f4517f3a
......@@ -117,6 +117,7 @@ module API
mount ::API::DeployKeys
mount ::API::Deployments
mount ::API::Environments
mount ::API::ErrorTracking
mount ::API::Events
mount ::API::Features
mount ::API::Files
......
# frozen_string_literal: true
module API
class ErrorTracking < Grape::API
before { authenticate! }
params do
requires :id, type: String, desc: 'The ID of a project'
end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
desc 'Get sentry error tracking settings for the project' do
success Entities::SentryProjectErrorTrackingSettings
end
get ':id/error_tracking/sentry_project_settings' do
authorize! :read_sentry_issue, user_project
sentry_project_settings = user_project.error_tracking_setting
present sentry_project_settings, with: Entities::SentryProjectErrorTrackingSettings
end
end
end
end
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