Chore: Propagate context for plugin settings (#41166)

Ref #36734
This commit is contained in:
Marcus Efraimsson
2021-11-02 13:42:55 +01:00
committed by GitHub
parent 1a89d97fed
commit f6be78b5ae
10 changed files with 58 additions and 49 deletions

View File

@@ -25,7 +25,7 @@ func NewApiPluginProxy(ctx *models.ReqContext, proxyPath string, route *plugins.
appID string, cfg *setting.Cfg, encryptionService encryption.Service) *httputil.ReverseProxy {
director := func(req *http.Request) {
query := models.GetPluginSettingByIdQuery{OrgId: ctx.OrgId, PluginId: appID}
if err := bus.Dispatch(&query); err != nil {
if err := bus.DispatchCtx(ctx.Req.Context(), &query); err != nil {
ctx.JsonApiErr(500, "Failed to fetch plugin settings", err)
return
}