annotations: you can now read annoations via manually created annoation query

This commit is contained in:
Torkel Ödegaard
2017-04-12 15:46:41 +02:00
parent 78f4bd2de9
commit 0156a94a49
9 changed files with 21 additions and 11 deletions
+3
View File
@@ -39,6 +39,7 @@ func GetAnnotations(c *middleware.Context) Response {
Text: item.Text,
Metric: item.Metric,
Title: item.Title,
PanelId: item.PanelId,
})
}
@@ -55,6 +56,8 @@ func PostAnnotation(c *middleware.Context, cmd dtos.PostAnnotationsCmd) Response
Epoch: cmd.Time / 1000,
Title: cmd.Title,
Text: cmd.Text,
CategoryId: cmd.CategoryId,
Type: annotations.EventType,
}
err := repo.Save(&item)