Chore: Remove Dispatch and AddHandler (#42603)
* Remove Dispatch * Remove context.TODO() * Remove AddHandler and Dispatch
This commit is contained in:
@@ -223,7 +223,7 @@ func getDashboardHelper(ctx context.Context, orgID int64, id int64, uid string)
|
||||
func (hs *HTTPServer) DeleteDashboardBySlug(c *models.ReqContext) response.Response {
|
||||
query := models.GetDashboardsBySlugQuery{OrgId: c.OrgId, Slug: web.Params(c.Req)[":slug"]}
|
||||
|
||||
if err := bus.Dispatch(&query); err != nil {
|
||||
if err := bus.DispatchCtx(c.Req.Context(), &query); err != nil {
|
||||
return response.Error(500, "Failed to retrieve dashboards by slug", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user