mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Remove linting exceptions in nodes-base (no-changelog) (#4944)
This commit is contained in:
@@ -35,7 +35,7 @@ export async function setupUpload(
|
||||
const data = new FormData();
|
||||
data.append('file', buffer, {
|
||||
contentType: mimeType,
|
||||
filename: mediaFileName || binaryFileName,
|
||||
filename: mediaFileName ?? binaryFileName,
|
||||
});
|
||||
data.append('messaging_product', 'whatsapp');
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ export async function mediaUploadFromItem(
|
||||
const data = new FormData();
|
||||
data.append('file', await BinaryDataManager.getInstance().retrieveBinaryData(binaryFile), {
|
||||
contentType: mimeType,
|
||||
filename: mediaFileName || binaryFileName,
|
||||
filename: mediaFileName ?? binaryFileName,
|
||||
});
|
||||
data.append('messaging_product', 'whatsapp');
|
||||
|
||||
@@ -105,7 +105,7 @@ export async function mediaUploadFromItem(
|
||||
set(
|
||||
requestOptions.body as IDataObject,
|
||||
`${operation}.filename`,
|
||||
mediaFileName || binaryFileName,
|
||||
mediaFileName ?? binaryFileName,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import countryCodes from 'currency-codes';
|
||||
import { INodeProperties } from 'n8n-workflow';
|
||||
import {
|
||||
cleanPhoneNumber,
|
||||
@@ -10,11 +11,12 @@ import {
|
||||
|
||||
export const mediaTypes = ['image', 'video', 'audio', 'sticker', 'document'];
|
||||
|
||||
let currencies = require('currency-codes/data');
|
||||
currencies = currencies.map(({ code, currency }: { code: string; currency: string }) => ({
|
||||
name: `${code} - ${currency}`,
|
||||
value: code,
|
||||
}));
|
||||
const currencies = countryCodes.data.map(
|
||||
({ code, currency }: { code: string; currency: string }) => ({
|
||||
name: `${code} - ${currency}`,
|
||||
value: code,
|
||||
}),
|
||||
);
|
||||
|
||||
export const messageFields: INodeProperties[] = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user