mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
👕 Fix lint issue
This commit is contained in:
parent
3623828283
commit
883d0936cb
|
@ -39,7 +39,7 @@ enum Source {
|
|||
OutboundEmail = 10
|
||||
}
|
||||
|
||||
interface ICreateTicketBody {
|
||||
interface ICreateTicketBody {
|
||||
name?: string;
|
||||
requester_id?: number;
|
||||
email?: string;
|
||||
|
@ -86,7 +86,7 @@ export class Freshdesk implements INodeType {
|
|||
name: 'freshdeskApi',
|
||||
required: true,
|
||||
}
|
||||
],
|
||||
],
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Resource',
|
||||
|
@ -565,7 +565,7 @@ export class Freshdesk implements INodeType {
|
|||
// }`,
|
||||
// description: 'Key value pairs containing the names and values of custom fields.',
|
||||
// },
|
||||
]
|
||||
]
|
||||
};
|
||||
|
||||
methods = {
|
||||
|
@ -689,15 +689,15 @@ export class Freshdesk implements INodeType {
|
|||
throw new Error('Requester Id must be a number');
|
||||
}
|
||||
body.requester_id = parseInt(value, 10);
|
||||
} else if (requester === 'email'){
|
||||
} else if (requester === 'email') {
|
||||
body.email = value;
|
||||
} else if (requester === 'facebookId'){
|
||||
} else if (requester === 'facebookId') {
|
||||
body.facebook_id = value;
|
||||
} else if (requester === 'phone'){
|
||||
} else if (requester === 'phone') {
|
||||
body.phone = value;
|
||||
} else if (requester === 'twitterId'){
|
||||
} else if (requester === 'twitterId') {
|
||||
body.twitter_id = value;
|
||||
} else if (requester === 'uniqueExternalId'){
|
||||
} else if (requester === 'uniqueExternalId') {
|
||||
body.unique_external_id = value;
|
||||
}
|
||||
|
||||
|
@ -782,5 +782,5 @@ export class Freshdesk implements INodeType {
|
|||
return {
|
||||
json: response
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,14 +11,14 @@ import {
|
|||
import * as _ from 'lodash';
|
||||
|
||||
export async function freshdeskApiRequest(this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, resource: string, method: string, body: any = {}, headers?: object): Promise<any> { // tslint:disable-line:no-any
|
||||
|
||||
|
||||
const credentials = this.getCredentials('freshdeskApi');
|
||||
|
||||
if (credentials === undefined) {
|
||||
throw new Error('No credentials got returned!');
|
||||
}
|
||||
|
||||
const apiKey = `${credentials.apiKey}:X`;
|
||||
const apiKey = `${credentials.apiKey}:X`;
|
||||
|
||||
const headerWithAuthentication = Object.assign({}, headers, { Authorization: `${Buffer.from(apiKey).toString(BINARY_ENCODING)}` });
|
||||
|
||||
|
@ -60,7 +60,7 @@ export function validateJSON(json: string | undefined): any { // tslint:disable-
|
|||
return result;
|
||||
}
|
||||
|
||||
export function capitalize (s: string) : string {
|
||||
export function capitalize(s: string): string {
|
||||
if (typeof s !== 'string') return '';
|
||||
return s.charAt(0).toUpperCase() + s.slice(1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue