Pārlūkot izejas kodu

api: tsdb api orgId fix

Torkel Ödegaard 8 gadi atpakaļ
vecāks
revīzija
6e344f6eea
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      pkg/api/metrics.go

+ 1 - 1
pkg/api/metrics.go

@@ -29,7 +29,7 @@ func QueryMetrics(c *middleware.Context, reqDto dtos.MetricRequest) Response {
 		return ApiError(400, "Query missing datasourceId", nil)
 		return ApiError(400, "Query missing datasourceId", nil)
 	}
 	}
 
 
-	dsQuery := models.GetDataSourceByIdQuery{Id: dsId}
+	dsQuery := models.GetDataSourceByIdQuery{Id: dsId, OrgId: c.OrgId}
 	if err := bus.Dispatch(&dsQuery); err != nil {
 	if err := bus.Dispatch(&dsQuery); err != nil {
 		return ApiError(500, "failed to fetch data source", err)
 		return ApiError(500, "failed to fetch data source", err)
 	}
 	}