Skip to content

Commit 701bd16

Browse files
committed
Small adjustments
1 parent 13eaccc commit 701bd16

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

components/calendarhero/sources/new-event-instant/new-event-instant.mjs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
description:
88
"Emit new event when a selected type of CalendarHero event occurs. [See the documentation](https://api.calendarhero.com/documentation#/webhook/postWebhookEvent)",
99
type: "source",
10-
version: "0.0.{{ts}}",
10+
version: "0.0.1",
1111
dedupe: "unique",
1212
props: {
1313
app,
@@ -47,14 +47,15 @@ export default {
4747
});
4848
},
4949
},
50-
async run(event) {
51-
const { body } = event;
50+
async run({ body }) {
5251
const ts = Date.now();
52+
const id = body.id ?? ts;
5353
this.$emit(body, {
54-
id: ts,
55-
summary: "New event",
54+
id,
55+
summary: `New event${id
56+
? ` (ID ${id})`
57+
: ""}`,
5658
ts,
5759
});
5860
},
59-
// sampleEmit,
6061
};

0 commit comments

Comments
 (0)