mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
n8n-3867-progressively-apply-prettier-to-all (#3873)
* 🔨 formatting nodes with prettier
This commit is contained in:
@@ -1,22 +1,10 @@
|
||||
import {
|
||||
Credentials,
|
||||
IExecuteFunctions,
|
||||
} from 'n8n-core';
|
||||
import { Credentials, IExecuteFunctions } from 'n8n-core';
|
||||
|
||||
import {
|
||||
IDataObject,
|
||||
ILoadOptionsFunctions,
|
||||
NodeApiError,
|
||||
NodeOperationError,
|
||||
} from 'n8n-workflow';
|
||||
import { IDataObject, ILoadOptionsFunctions, NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
OptionsWithUri,
|
||||
} from 'request';
|
||||
import { OptionsWithUri } from 'request';
|
||||
|
||||
import {
|
||||
LoaderGetResponse,
|
||||
} from './types';
|
||||
import { LoaderGetResponse } from './types';
|
||||
|
||||
export async function monicaCrmApiRequest(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||
@@ -25,7 +13,11 @@ export async function monicaCrmApiRequest(
|
||||
body: IDataObject = {},
|
||||
qs: IDataObject = {},
|
||||
) {
|
||||
const credentials = await this.getCredentials('monicaCrmApi') as { apiToken: string, environment: string, domain: string };
|
||||
const credentials = (await this.getCredentials('monicaCrmApi')) as {
|
||||
apiToken: string;
|
||||
environment: string;
|
||||
domain: string;
|
||||
};
|
||||
|
||||
if (credentials === undefined) {
|
||||
throw new NodeOperationError(this.getNode(), 'No credentials got returned!');
|
||||
@@ -96,8 +88,7 @@ export async function monicaCrmApiRequestAllItems(
|
||||
/**
|
||||
* Get day, month, and year from the n8n UI datepicker.
|
||||
*/
|
||||
export const getDateParts = (date: string) =>
|
||||
date.split('T')[0].split('-').map(Number).reverse();
|
||||
export const getDateParts = (date: string) => date.split('T')[0].split('-').map(Number).reverse();
|
||||
|
||||
export const toOptions = (response: LoaderGetResponse) =>
|
||||
response.data.map(({ id, name }) => ({ value: id, name }));
|
||||
|
||||
Reference in New Issue
Block a user