fix: annnotation api & sql issue

This commit is contained in:
Torkel Ödegaard
2018-06-25 16:02:34 +02:00
parent ed1fec8e0f
commit 132df4553c
4 changed files with 21 additions and 16 deletions

View File

@@ -213,6 +213,7 @@ func DeleteAnnotations(c *m.ReqContext, cmd dtos.DeleteAnnotationsCmd) Response
repo := annotations.GetRepository()
err := repo.Delete(&annotations.DeleteParams{
OrgId: c.OrgId,
Id: cmd.AnnotationId,
RegionId: cmd.RegionId,
DashboardId: cmd.DashboardId,
@@ -235,7 +236,8 @@ func DeleteAnnotationByID(c *m.ReqContext) Response {
}
err := repo.Delete(&annotations.DeleteParams{
Id: annotationID,
OrgId: c.OrgId,
Id: annotationID,
})
if err != nil {
@@ -254,6 +256,7 @@ func DeleteAnnotationRegion(c *m.ReqContext) Response {
}
err := repo.Delete(&annotations.DeleteParams{
OrgId: c.OrgId,
RegionId: regionID,
})