tech(notifications): splitt into 3 queries

closes #5883
This commit is contained in:
bergquist
2016-09-06 08:43:15 +02:00
parent c893e5d241
commit 2ca7284a56
5 changed files with 93 additions and 25 deletions
+2 -2
View File
@@ -147,7 +147,7 @@ func DelAlert(c *middleware.Context) Response {
}
func GetAlertNotifications(c *middleware.Context) Response {
query := &models.GetAlertNotificationsQuery{OrgId: c.OrgId}
query := &models.GetAllAlertNotificationsQuery{OrgId: c.OrgId}
if err := bus.Dispatch(query); err != nil {
return ApiError(500, "Failed to get alert notifications", err)
@@ -179,7 +179,7 @@ func GetAlertNotificationById(c *middleware.Context) Response {
return ApiError(500, "Failed to get alert notifications", err)
}
return Json(200, query.Result[0])
return Json(200, query.Result)
}
func CreateAlertNotification(c *middleware.Context, cmd models.CreateAlertNotificationCommand) Response {