Pubdash: Email sharing handle dashboard deleted (#64247)

dashboard service calls pubdash service when dashboard deleted
This commit is contained in:
owensmallwood
2023-03-08 14:54:35 -06:00
committed by GitHub
parent 154fa2dd00
commit 1a5a280c86
14 changed files with 251 additions and 152 deletions
+6
View File
@@ -326,6 +326,12 @@ func (hs *HTTPServer) deleteDashboard(c *contextmodel.ReqContext) response.Respo
hs.log.Error("Failed to disconnect library elements", "dashboard", dash.ID, "user", c.SignedInUser.UserID, "error", err)
}
// deletes all related public dashboard entities
err = hs.PublicDashboardsApi.PublicDashboardService.DeleteByDashboard(c.Req.Context(), dash)
if err != nil {
hs.log.Error("Failed to delete public dashboard")
}
err = hs.DashboardService.DeleteDashboard(c.Req.Context(), dash.ID, c.OrgID)
if err != nil {
var dashboardErr dashboards.DashboardErr