Rename DispatchCtx to Dispatch (#43563)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user