Skip to content

Commit

Permalink
style: format code
Browse files Browse the repository at this point in the history
Signed-off-by: Raúl Fernández Fernández <[email protected]>
  • Loading branch information
rfdez committed Sep 26, 2023
1 parent 6eea40c commit 67e0ec1
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions nodes/Splitwise/Splitwise.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ export class Splitwise implements INodeType {
);

if (!responseData.success) {
const errorMessage = responseData.errors.expense?.length ? responseData.errors.expense.join(', ') : 'Could not delete expense';
const errorMessage = responseData.errors.expense?.length
? responseData.errors.expense.join(', ')
: 'Could not delete expense';
throw new NodeOperationError(this.getNode(), errorMessage, { itemIndex: i });
}

Expand Down Expand Up @@ -210,7 +212,9 @@ export class Splitwise implements INodeType {
);

if (!responseData.success) {
throw new NodeOperationError(this.getNode(), "Could not restore expense", { itemIndex: i });
throw new NodeOperationError(this.getNode(), 'Could not restore expense', {
itemIndex: i,
});
}

responseData = { success: true };
Expand All @@ -224,7 +228,9 @@ export class Splitwise implements INodeType {
responseData = await splitwiseApiRequest.call(this, 'POST', `/delete_group/${id}`, {});

if (!responseData.success) {
throw new NodeOperationError(this.getNode(), "Could not delete group", { itemIndex: i });
throw new NodeOperationError(this.getNode(), 'Could not delete group', {
itemIndex: i,
});
}

responseData = { success: true };
Expand Down Expand Up @@ -255,7 +261,9 @@ export class Splitwise implements INodeType {
);

if (!responseData.success) {
const errorMessage = responseData.errors?.length ? responseData.errors.join(', ') : 'Could not restore group';
const errorMessage = responseData.errors?.length
? responseData.errors.join(', ')
: 'Could not restore group';
throw new NodeOperationError(this.getNode(), errorMessage, { itemIndex: i });
}

Expand Down

0 comments on commit 67e0ec1

Please sign in to comment.