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/metrics/user_starred_dashboards.rb')
-rw-r--r--lib/api/metrics/user_starred_dashboards.rb21
1 files changed, 2 insertions, 19 deletions
diff --git a/lib/api/metrics/user_starred_dashboards.rb b/lib/api/metrics/user_starred_dashboards.rb
index b7fba2b6459..eeb1efb9001 100644
--- a/lib/api/metrics/user_starred_dashboards.rb
+++ b/lib/api/metrics/user_starred_dashboards.rb
@@ -25,15 +25,7 @@ module API
end
post ':id/metrics/user_starred_dashboards' do
- not_found! if Feature.enabled?(:remove_monitor_metrics)
-
- result = ::Metrics::UsersStarredDashboards::CreateService.new(current_user, user_project, params[:dashboard_path]).execute
-
- if result.success?
- present result.payload, with: Entities::Metrics::UserStarredDashboard
- else
- error!({ errors: result.message }, 400)
- end
+ not_found!
end
desc 'Remove a star from a dashboard' do
@@ -52,16 +44,7 @@ module API
end
delete ':id/metrics/user_starred_dashboards' do
- not_found! if Feature.enabled?(:remove_monitor_metrics)
-
- result = ::Metrics::UsersStarredDashboards::DeleteService.new(current_user, user_project, params[:dashboard_path]).execute
-
- if result.success?
- status :ok
- result.payload
- else
- status :bad_request
- end
+ not_found!
end
end
end