@@ -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
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ func TestPluginProxy(t *testing.T) {
|
||||
Method: "GET",
|
||||
}
|
||||
|
||||
bus.AddHandler("test", func(query *models.GetPluginSettingByIdQuery) error {
|
||||
bus.AddHandlerCtx("test", func(_ context.Context, query *models.GetPluginSettingByIdQuery) error {
|
||||
query.Result = &models.PluginSetting{}
|
||||
return nil
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user