👕 Fix lint issue

This commit is contained in:
Jan Oberhauser 2020-09-01 09:22:41 +02:00
parent a5d7ae22c5
commit d2f6bd7e42
2 changed files with 2 additions and 2 deletions

View file

@ -249,7 +249,7 @@ class App {
if (token === undefined || token === '') { if (token === undefined || token === '') {
return ResponseHelper.jwtAuthAuthorizationError(res, "Missing token"); return ResponseHelper.jwtAuthAuthorizationError(res, "Missing token");
} }
if (jwtHeaderValuePrefix != '' && token.startsWith(jwtHeaderValuePrefix)) { if (jwtHeaderValuePrefix !== '' && token.startsWith(jwtHeaderValuePrefix)) {
token = token.replace(jwtHeaderValuePrefix + ' ', '').trimLeft(); token = token.replace(jwtHeaderValuePrefix + ' ', '').trimLeft();
} }

View file

@ -10,7 +10,7 @@ import {
export async function salesforceApiRequest(this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any export async function salesforceApiRequest(this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
const credentials = this.getCredentials('salesforceOAuth2Api'); const credentials = this.getCredentials('salesforceOAuth2Api');
const subdomain = ((credentials!.accessTokenUrl as string).match(/https:\/\/(.+).salesforce\.com/) || [])[1] const subdomain = ((credentials!.accessTokenUrl as string).match(/https:\/\/(.+).salesforce\.com/) || [])[1];
const options: OptionsWithUri = { const options: OptionsWithUri = {
method, method,
body: method === "GET" ? undefined : body, body: method === "GET" ? undefined : body,