Skip to content

Commit dfd7b79

Browse files
committed
Fix typos in descriptions and improve webhook ID handling in indiefunnels component
1 parent cee0992 commit dfd7b79

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

components/indiefunnels/indiefunnels.app.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
memberId: {
99
type: "string",
1010
label: "Member ID",
11-
description: "The Id of the member to update",
11+
description: "The ID of the member to update",
1212
async options({ page }) {
1313
const { items } = await this.listMembers({
1414
params: {
@@ -27,7 +27,7 @@ export default {
2727
contactId: {
2828
type: "string",
2929
label: "Contact ID",
30-
description: "Contact id of the member",
30+
description: "Contact ID of the member",
3131
async options({ page }) {
3232
const { items } = await this.listContacts({
3333
params: {
@@ -47,7 +47,7 @@ export default {
4747
groups: {
4848
type: "string[]",
4949
label: "Member Groups",
50-
description: "Member group id(s) to which the member belong",
50+
description: "Member group ID(s) to which the member belongs",
5151
async options() {
5252
const items = await this.listMemberGroups();
5353

@@ -242,7 +242,7 @@ export default {
242242
_headers() {
243243
return {
244244
"Authorization": `Bearer ${this.$auth.api_key}`,
245-
"user-agent ": "@PipedreamHQ/pipedream v0.1",
245+
"user-agent": "@PipedreamHQ/pipedream v0.1",
246246
};
247247
},
248248
_makeRequest({

components/indiefunnels/sources/common/base.mjs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ export default {
77
db: "$.service.db",
88
http: "$.interface.http",
99
},
10+
methods: {
11+
_setWebhookId(id) {
12+
this.db.set("webhookId", id);
13+
},
14+
_getWebhookId() {
15+
return this.db.get("webhookId");
16+
},
17+
},
1018
hooks: {
1119
async activate() {
1220
const response = await this.indiefunnels.createHook({
@@ -16,10 +24,10 @@ export default {
1624
events: this.getEvent(),
1725
},
1826
});
19-
this.db.set("webhookId", response.id);
27+
this._setWebhookId(response.id);
2028
},
2129
async deactivate() {
22-
const webhookId = this.db.get("webhookId");
30+
const webhookId = this._getWebhookId();
2331
await this.indiefunnels.deleteHook(webhookId);
2432
},
2533
},

0 commit comments

Comments
 (0)