diff options
Diffstat (limited to 'app/controllers/projects/prometheus/alerts_controller.rb')
-rw-r--r-- | app/controllers/projects/prometheus/alerts_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/projects/prometheus/alerts_controller.rb b/app/controllers/projects/prometheus/alerts_controller.rb index 19c908026cf..312919831d4 100644 --- a/app/controllers/projects/prometheus/alerts_controller.rb +++ b/app/controllers/projects/prometheus/alerts_controller.rb @@ -30,7 +30,11 @@ module Projects token = extract_alert_manager_token(request) result = notify_service.execute(token) - head result.http_status + if result.success? + render json: AlertManagement::AlertSerializer.new.represent(result.payload[:alerts]), code: result.http_status + else + head result.http_status + end end def create |