refactor(core): Remove linting exceptions in nodes-base (no-changelog) (#4944)

This commit is contained in:
Michael Kret
2023-01-13 19:11:56 +02:00
committed by GitHub
parent d7732ea150
commit 6608e69457
254 changed files with 2687 additions and 2675 deletions

View File

@@ -28,7 +28,7 @@ export async function webexApiRequest(
method,
body,
qs,
uri: uri || `https://webexapis.com/v1${resource}`,
uri: uri ?? `https://webexapis.com/v1${resource}`,
json: true,
};
try {
@@ -128,6 +128,12 @@ export function mapResource(event: string) {
)[event];
}
function removeEmptyProperties(rest: { [key: string]: any }) {
return Object.keys(rest)
.filter((k) => rest[k] !== '')
.reduce((a, k) => ({ ...a, [k]: rest[k] }), {});
}
export function getAttachemnts(attachements: IDataObject[]) {
const _attachments: IDataObject[] = [];
for (const attachment of attachements) {
@@ -621,12 +627,6 @@ export function getInputTextProperties(): INodeProperties[] {
];
}
function removeEmptyProperties(rest: { [key: string]: any }) {
return Object.keys(rest)
.filter((k) => rest[k] !== '')
.reduce((a, k) => ({ ...a, [k]: rest[k] }), {});
}
export function getAutomaticSecret(credentials: ICredentialDataDecryptedObject) {
const data = `${credentials.clientId},${credentials.clientSecret}`;
return createHash('md5').update(data).digest('hex');