Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

Commit 9ec5bef

Browse files
committed
lint
1 parent f3779c1 commit 9ec5bef

File tree

3 files changed

+84
-84
lines changed

3 files changed

+84
-84
lines changed

nodes/CodeChat/Generic.func.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ export async function sendErrorPostReceive(
1313
response: IN8nHttpFullResponse,
1414
): Promise<INodeExecutionData[]> {
1515
const body = response?.body as RequestBody.IError;
16-
if (body?.error) {
17-
throw new NodeApiError(
18-
this.getNode(),
19-
{ error: body.error, message: body.message },
20-
{
21-
message: 'Check the type of properties and values entered',
22-
description:
23-
'Check that there are no undefined values; whether the type of values is as expected or whether mandatory properties have been entered.',
24-
httpCode: body.statusCode.toString(),
25-
},
26-
);
27-
}
16+
if (body?.error) {
17+
throw new NodeApiError(
18+
this.getNode(),
19+
{ error: body.error, message: body.message },
20+
{
21+
message: 'Check the type of properties and values entered',
22+
description:
23+
'Check that there are no undefined values; whether the type of values is as expected or whether mandatory properties have been entered.',
24+
httpCode: body.statusCode.toString(),
25+
},
26+
);
27+
}
2828
return data;
2929
}
3030

@@ -130,7 +130,7 @@ export async function prepareShippingOptions(
130130

131131
const optsKeys = Object.keys(opts);
132132

133-
Object.assign(requestOptions.body as {}, { options: optsKeys.length > 0 ? opts: undefined });
133+
Object.assign(requestOptions.body as {}, { options: optsKeys.length > 0 ? opts : undefined });
134134

135135
return requestOptions;
136136
}

nodes/CodeChat/descriptions/Chat.desc.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const onWhatsappProperties: INodeProperties[] = [
1414
send: { type: 'body', property: 'numbers', preSend: [formatNumber] },
1515
request: {
1616
url: '=' + requestURL('chat', 'onWhatsApp'),
17-
method: 'POST'
17+
method: 'POST',
1818
},
1919
},
2020
displayOptions: {
@@ -103,8 +103,8 @@ export const updatePresence: INodeProperties[] = [
103103
routing: {
104104
request: {
105105
url: '=' + requestURL('chat', 'updatePresence'),
106-
method: 'PUT'
107-
}
106+
method: 'PUT',
107+
},
108108
},
109109
displayOptions: {
110110
show: {
@@ -127,7 +127,7 @@ export const markMSGReadProperties: INodeProperties[] = [
127127
send: { type: 'body', property: 'readMessage', preSend: [readMessage] },
128128
request: {
129129
url: '=' + requestURL('chat', 'markMessageAsRead'),
130-
method: 'PUT'
130+
method: 'PUT',
131131
},
132132
},
133133
displayOptions: {
@@ -147,13 +147,13 @@ export const deleteMessageProperties: INodeProperties[] = [
147147
type: 'string',
148148
default: '',
149149
placeholder: 'E10D3435A07F6111089C7875814A667F',
150-
routing: { send: {type:'body', property: 'messageId'} },
150+
routing: { send: { type: 'body', property: 'messageId' } },
151151
displayOptions: {
152152
show: {
153153
resource: ['chat'],
154-
operation: ['deleteMessage']
155-
}
156-
}
154+
operation: ['deleteMessage'],
155+
},
156+
},
157157
},
158158

159159
{
@@ -163,13 +163,13 @@ export const deleteMessageProperties: INodeProperties[] = [
163163
type: 'boolean',
164164
default: true,
165165
placeholder: '',
166-
routing: { send: { type:'body', property:'fromMe' } },
166+
routing: { send: { type: 'body', property: 'fromMe' } },
167167
displayOptions: {
168168
show: {
169169
resource: ['chat'],
170-
operation: ['deleteMessage']
171-
}
172-
}
170+
operation: ['deleteMessage'],
171+
},
172+
},
173173
},
174174

175175
{
@@ -183,9 +183,9 @@ export const deleteMessageProperties: INodeProperties[] = [
183183
displayOptions: {
184184
show: {
185185
resource: ['chat'],
186-
operation: ['deleteMessage']
187-
}
188-
}
186+
operation: ['deleteMessage'],
187+
},
188+
},
189189
},
190190

191191
{
@@ -199,9 +199,9 @@ export const deleteMessageProperties: INodeProperties[] = [
199199
displayOptions: {
200200
show: {
201201
resource: ['chat'],
202-
operation: ['deleteMessage']
203-
}
204-
}
202+
operation: ['deleteMessage'],
203+
},
204+
},
205205
},
206206

207207
{
@@ -212,7 +212,7 @@ export const deleteMessageProperties: INodeProperties[] = [
212212
routing: {
213213
request: {
214214
url: '=' + requestURL('chat', 'deleteMessage'),
215-
method: 'DELETE'
215+
method: 'DELETE',
216216
},
217217
},
218218
displayOptions: {
@@ -265,10 +265,10 @@ export const blockCobtactProperties: INodeProperties[] = [
265265
type: 'hidden',
266266
default: '',
267267
routing: {
268-
request: {
268+
request: {
269269
url: '=' + requestURL('chat', 'blockContact'),
270-
method: 'PUT'
271-
}
270+
method: 'PUT',
271+
},
272272
},
273273
displayOptions: {
274274
show: {
@@ -290,7 +290,7 @@ export const statusContactPorperties: INodeProperties[] = [
290290
send: { type: 'query', property: 'number' },
291291
request: {
292292
url: '=' + requestURL('chat', 'fetchStatusContact'),
293-
method: 'GET'
293+
method: 'GET',
294294
},
295295
},
296296
displayOptions: {
@@ -314,7 +314,7 @@ export const updateStatusProperties: INodeProperties[] = [
314314
send: { type: 'body', property: 'status' },
315315
request: {
316316
url: '=' + requestURL('chat', 'updateStaus'),
317-
method: 'PUT'
317+
method: 'PUT',
318318
},
319319
},
320320
displayOptions: {
@@ -333,13 +333,13 @@ export const budinessProfileProperties: INodeProperties[] = [
333333
required: true,
334334
type: 'string',
335335
default: '',
336-
description: 'Retrieve a contact\'s business information',
336+
description: "Retrieve a contact's business information",
337337
placeholder: '5531900000000',
338338
routing: {
339339
send: { type: 'query', property: 'number' },
340340
request: {
341341
url: '=' + requestURL('chat', 'fetchBusinessProfile'),
342-
method: 'GET'
342+
method: 'GET',
343343
},
344344
},
345345
displayOptions: {
@@ -364,7 +364,7 @@ export const profilePictureProperties: INodeProperties[] = [
364364
send: { type: 'query', property: 'number' },
365365
request: {
366366
url: '=' + requestURL('chat', 'fetchProfilePictureUrl'),
367-
method: 'GET'
367+
method: 'GET',
368368
},
369369
},
370370
displayOptions: {

0 commit comments

Comments
 (0)