Skip to content

Commit

Permalink
Fix playground explorer with multiple api keys - resolves partially #794
Browse files Browse the repository at this point in the history
  • Loading branch information
dvesh3 committed Aug 31, 2023
1 parent 460d594 commit 900cdc4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Resources/public/js/configuration/graphql/configItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ pimcore.plugin.datahub.configuration.graphql.configItem = Class.create(pimcore.e
url: '/admin/pimcoredatahub/config/get-explorer-url?name=' + this.data.general.name,

success: function (callbackFn, response, opts) {

var data = Ext.decode(response.responseText);
var securityValues = this.securityForm.getForm().getFieldValues();
var explorerUrl = window.location.origin + data.explorerUrl;
let data = Ext.decode(response.responseText);
let securityValues = this.securityForm.getForm().getFieldValues();
let explorerUrl = window.location.origin + data.explorerUrl;
if (securityValues && securityValues["method"] == "datahub_apikey") {
explorerUrl = explorerUrl + "?apikey=" + securityValues["apikey"];
let apiKeys = securityValues["apikey"].split("\n");
explorerUrl = explorerUrl + "?apikey=" + apiKeys[0];
}
callbackFn(explorerUrl);
}.bind(this, callbackFn)
Expand Down

0 comments on commit 900cdc4

Please sign in to comment.