first commit

This commit is contained in:
Lee
2023-10-19 05:21:35 +01:00
parent 4cfe8463ee
commit 6acf6e8635
20 changed files with 3089 additions and 143 deletions

3
src/jobs/index.ts Normal file
View File

@ -0,0 +1,3 @@
// export all your job files here
export * from "./setupUser";

16
src/jobs/setupUser.ts Normal file
View File

@ -0,0 +1,16 @@
import { triggerClient } from "@/trigger";
import { eventTrigger } from "@trigger.dev/sdk";
triggerClient.defineJob({
id: "setup-user",
name: "Setup User: Add first time user to the database",
version: "0.0.1",
trigger: eventTrigger({
name: "user.add",
}),
run: async (payload, io, ctx) => {
const { id } = payload;
await io.logger.info(`Setup User: Running for ${id}`);
},
});