Commit c4f7787b authored by raju249's avatar raju249

Add settings service for fetching data from error tracking settings model

parent a7c5d1ab
......@@ -35,10 +35,24 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle
render json: {
result: result
}
end
private
def render_sentry_project_settings_json
service = ErrorTracking::ProjectSettingsService.new(
project,
current_user
)
result = service.execute
return if handle_errors(result)
render json: {
project_name: result[:project_name],
sentry_api_url: result[:sentry_api_url]
}
end
def render_index_json
service = ErrorTracking::ListIssuesService.new(
project,
......
......@@ -85,6 +85,13 @@ module ErrorTracking
end
end
def sentry_project_settings
{
project_name: self.project_name,
sentry_api_url: self.sentry_external_url
}
end
def list_sentry_projects
{ projects: sentry_client.projects }
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