Skip to content

Commit 245ea12

Browse files
committed
ESLint Fixes
1 parent 2225f9c commit 245ea12

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

components/quickbooks/sources/common.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,17 @@ module.exports = {
7878
await this.processEvent(entity);
7979
},
8080
async processEvent(entity) {
81-
const {name, id, operation, lastUpdated} = entity
81+
const {
82+
name,
83+
id,
84+
operation,
85+
lastUpdated,
86+
} = entity;
8287
// Unless the record has been deleted, use the id received in the webhook
8388
// to get the full record data
8489
const eventToEmit = {
8590
event_notification: entity,
86-
record_details: operation === "Delete"
91+
record_details: operation === "Delete"
8792
? {}
8893
: await this.quickbooks.getRecordDetails(name, id),
8994
};
@@ -92,14 +97,14 @@ module.exports = {
9297
const ts = lastUpdated
9398
? Date.parse(lastUpdated)
9499
: Date.now();
95-
const event_id = [
100+
const eventId = [
96101
name,
97102
id,
98103
operation,
99104
ts,
100105
].join("-");
101106
this.$emit(eventToEmit, {
102-
id: event_id,
107+
id: eventId,
103108
summary,
104109
ts,
105110
});
@@ -113,12 +118,11 @@ module.exports = {
113118
if (!this.isValidSource(event, webhookCompanyId)) {
114119
console.log("Skipping event from unrecognized source.");
115120
return;
116-
}
121+
}
117122

118123
await Promise.all(entities.map((entity) => {
119124
entity.realmId = webhookCompanyId;
120125
return this.validateAndEmit(entity);
121126
}));
122-
}
123127
},
124128
};

components/quickbooks/sources/custom-webhook-events/custom-webhook-events.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = {
3737
&& !this.operationsToEmit.includes(entity.operation)) {
3838
console.log(`Operation '${entity.operation}' not found in list of selected Operations`);
3939
return;
40-
}
40+
}
4141
await this.processEvent(entity);
4242
},
4343
},

components/quickbooks/sources/new-or-modified-customer/new-or-modified-customer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ module.exports = {
3636
if (entity.name !== sourceEntity) {
3737
console.log(`${entity.name} webhook received and ignored, since it is not a Customer`);
3838
return;
39-
}
39+
}
4040
if (this.operationsToEmit.length > 0
4141
&& !this.operationsToEmit.includes(entity.operation)) {
4242
console.log(`Operation '${entity.operation}' not found in list of selected Operations`);
43-
return;
43+
return;
4444
}
4545
await this.processEvent(entity);
4646
},

0 commit comments

Comments
 (0)