Skip to content

Commit a962290

Browse files
committed
restapi: GET /alerts/acknowledge?key=.. => ?id=..
1 parent 3613e53 commit a962290

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmd/alertmanager/restapi.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ func handleRestCall(ctx context.Context, req events.APIGatewayProxyRequest) (*ev
2727
case "GET /alerts/acknowledge":
2828
// this endpoint should really be a POST (since it mutates state), but we've to be
2929
// pragmatic here because we want acks to be ack-able from emails
30-
key := req.QueryStringParameters["key"]
31-
if key == "" {
32-
return apigatewayutils.BadRequest("key not specified"), nil
30+
id := req.QueryStringParameters["id"]
31+
if id == "" {
32+
return apigatewayutils.BadRequest("id not specified"), nil
3333
}
3434

35-
return handleAcknowledgeAlert(ctx, key)
35+
return handleAcknowledgeAlert(ctx, id)
3636
case "POST /alerts/ingest":
3737
alert := amstate.Alert{}
3838
if err := jsonfile.Unmarshal(bytes.NewBufferString(req.Body), &alert, true); err != nil {

0 commit comments

Comments
 (0)