Skip to content

Commit 12b2254

Browse files
authored
Basecamp improvement (#16007)
* pnpm * Adding to-do item data fetching * package bump
1 parent 4a345ef commit 12b2254

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

components/basecamp/sources/new-to-do-item-created/new-to-do-item-created.mjs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "basecamp-new-to-do-item-created",
66
name: "New To-Do Item Created (Instant)",
77
description: "Emit new event when a to-do item is created. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/webhooks.md#webhooks)",
8-
version: "0.0.8",
8+
version: "0.1.0",
99
dedupe: "unique",
1010
type: "source",
1111
methods: {
@@ -20,5 +20,20 @@ export default {
2020
"todo_created",
2121
];
2222
},
23+
async getEventData(data) {
24+
return data;
25+
},
26+
},
27+
async run({ body }) {
28+
if (this.filterEvent(body)) {
29+
const {
30+
accountId, projectId,
31+
} = this;
32+
body.recording = await this.app.makeRequest({
33+
accountId,
34+
path: `/buckets/${projectId}/todos/${body.recording.id}.json`,
35+
});
36+
this.emitEvent(body);
37+
}
2338
},
2439
};

0 commit comments

Comments
 (0)