Rename DispatchCtx to Dispatch (#43563)

This commit is contained in:
idafurjes
2021-12-28 17:36:22 +01:00
committed by GitHub
parent 7936c4c522
commit 8e6d6af744
107 changed files with 291 additions and 291 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ func (h *DashboardHandler) OnSubscribe(ctx context.Context, user *models.SignedI
// make sure can view this dashboard
if len(parts) == 2 && parts[0] == "uid" {
query := models.GetDashboardQuery{Uid: parts[1], OrgId: user.OrgId}
if err := bus.DispatchCtx(ctx, &query); err != nil {
if err := bus.Dispatch(ctx, &query); err != nil {
logger.Error("Error getting dashboard", "query", query, "error", err)
return models.SubscribeReply{}, backend.SubscribeStreamStatusNotFound, nil
}
@@ -109,7 +109,7 @@ func (h *DashboardHandler) OnPublish(ctx context.Context, user *models.SignedInU
return models.PublishReply{}, backend.PublishStreamStatusNotFound, fmt.Errorf("ignore???")
}
query := models.GetDashboardQuery{Uid: parts[1], OrgId: user.OrgId}
if err := bus.DispatchCtx(ctx, &query); err != nil {
if err := bus.Dispatch(ctx, &query); err != nil {
logger.Error("Unknown dashboard", "query", query)
return models.PublishReply{}, backend.PublishStreamStatusNotFound, nil
}