From 8bc5855c875686b56085add4548851b71d940dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Fri, 28 Apr 2017 11:34:01 -0700 Subject: [PATCH] Serialize AlertStatus as 'status' AlertStatus doesn't have json tag with the field name, so it's serialized into 'Status', and it's the only uppercase field in the alert object. Tag it with 'status' name for consistency --- dispatch/dispatch.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dispatch/dispatch.go b/dispatch/dispatch.go index 3835c38b..b05ef664 100644 --- a/dispatch/dispatch.go +++ b/dispatch/dispatch.go @@ -81,9 +81,9 @@ type AlertBlock struct { type APIAlert struct { *model.Alert - Status types.AlertState - InhibitedBy []string `json:"inhibitedBy"` - SilencedBy []string `json:"silencedBy"` + Status types.AlertState `json:"status"` + InhibitedBy []string `json:"inhibitedBy"` + SilencedBy []string `json:"silencedBy"` } // AlertGroup is a list of alert blocks grouped by the same label set.