Files
5695ba7c13 feat: Tasker (#14180)
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Joe Au-Yeung <[email protected]>
2024-04-18 11:56:25 -07:00

17 lines
481 B
TypeScript

import tasker from "@calcom/features/tasker";
import type sendPayload from "./sendPayload";
type SchedulePayload = typeof sendPayload;
const schedulePayload: SchedulePayload = async (secretKey, triggerEvent, createdAt, webhook, data) => {
await tasker.create("sendWebhook", JSON.stringify({ secretKey, triggerEvent, createdAt, webhook, data }));
return {
ok: true,
status: 200,
message: "Webhook scheduled successfully",
};
};
export default schedulePayload;