Merge pull request #2 from heroku/instance-url-for-soap-api
Use instance URL for SOAP API
This commit is contained in:
Коммит
4bd01a1ddf
|
@ -4,6 +4,8 @@ force://<clientId>:<clientSecret>:<refreshToken>@<instanceUrl>
|
|||
var URL_REGEX = /force:\/\/(.*):(.*):(.*)@(.*)/;
|
||||
var TOKEN_REGEX = /.*\"access_token\":\"([A-Za-z0-9.!_]*)\".*/;
|
||||
|
||||
const forceApiVersion = '37.0';
|
||||
|
||||
function parseUrl(oauth_url) {
|
||||
if(oauth_url) {
|
||||
const matcher = oauth_url.match(URL_REGEX);
|
||||
|
@ -33,7 +35,9 @@ function oauthConfig(addonInfo) {
|
|||
oauth2,
|
||||
instanceUrl,
|
||||
loginUrl: instanceUrl,
|
||||
refreshToken: addonInfo.refreshToken
|
||||
serverUrl: `https://${instanceUrl}/services/Soap/u/${forceApiVersion}`,
|
||||
refreshToken: addonInfo.refreshToken,
|
||||
version: forceApiVersion
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"homepage": "https://github.com/forcedotcom/force-com-buildpack#readme",
|
||||
"dependencies": {
|
||||
"bluebird": "^3.4.0",
|
||||
"jsforce": "^1.6.5"
|
||||
"jsforce": "^1.6.5",
|
||||
"request": "^2.72.0"
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче