feat(alerting): add api route for alert changes
This commit is contained in:
@@ -21,6 +21,19 @@ func ValidateOrgAlert(c *middleware.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// GET /api/alert_rule
|
||||
func GetAlertChanges(c *middleware.Context) Response {
|
||||
query := models.GetAlertChangesQuery{
|
||||
OrgId: c.OrgId,
|
||||
}
|
||||
|
||||
if err := bus.Dispatch(&query); err != nil {
|
||||
return ApiError(500, "List alerts failed", err)
|
||||
}
|
||||
|
||||
return Json(200, query.Result)
|
||||
}
|
||||
|
||||
// GET /api/alert_rule
|
||||
func GetAlerts(c *middleware.Context) Response {
|
||||
query := models.GetAlertsQuery{
|
||||
|
||||
Reference in New Issue
Block a user