diff options
Diffstat (limited to 'app/controllers/projects/prometheus/alerts_controller.rb')
-rw-r--r-- | app/controllers/projects/prometheus/alerts_controller.rb | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/app/controllers/projects/prometheus/alerts_controller.rb b/app/controllers/projects/prometheus/alerts_controller.rb index c3dc17694d9..27ac64e5758 100644 --- a/app/controllers/projects/prometheus/alerts_controller.rb +++ b/app/controllers/projects/prometheus/alerts_controller.rb @@ -23,11 +23,7 @@ module Projects token = extract_alert_manager_token(request) result = notify_service.execute(token) - if result.success? - render json: AlertManagement::AlertSerializer.new.represent(result.payload[:alerts]), code: result.http_status - else - head result.http_status - end + head result.http_status end private @@ -37,19 +33,6 @@ module Projects .new(project, params.permit!) end - def serialize_as_json(alert_obj) - serializer.represent(alert_obj) - end - - def serializer - PrometheusAlertSerializer - .new(project: project, current_user: current_user) - end - - def alerts - alerts_finder.execute - end - def alert @alert ||= alerts_finder(metric: params[:id]).execute.first || render_404 end |