move dashboard error to API (not sql)
This commit is contained in:
1 parent
0c7294593c
commit
db92a96067
2 files changed
+30
-4
No files matched your search
@@ -63,6 +63,11 @@ func PostAnnotation(c *m.ReqContext, cmd dtos.PostAnnotationsCmd) Response {
|
||||
return ApiError(500, "Failed to save annotation", err)
|
||||
}
|
||||
|
||||
if cmd.DashboardId == 0 {
|
||||
err := &CreateAnnotationError{"Missing DashboardID"}
|
||||
return ApiError(500, "Failed to save annotation", err)
|
||||
}
|
||||
|
||||
item := annotations.Item{
|
||||
OrgId: c.OrgId,
|
||||
UserId: c.UserId,
|
||||
|
||||
Reference in new issue
Block a user