Skip to content

Commit

Permalink
maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
oscartbeaumont committed Feb 3, 2024
1 parent 5fc470c commit 4d6663f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 27 deletions.
24 changes: 0 additions & 24 deletions api/src/routers/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,4 @@ export const internalRouter = createTRPCRouter({

return {};
}),

// TODO: Remove this in the future once user sync is setup.
seed_tenant: superAdminProcedure
.input(z.object({ tenantId: z.string() }))
.query(async ({ ctx, input }) => {
const id = decodeId("tenant", input.tenantId);

await db.insert(users).values(
(
await import("./users.json")
).map(
(user) =>
({
name: user.name,
email: user.email,
tenantId: id,
provider: "mock",
providerId: user.id.toString(),
} as const)
)
);

return "ok";
}),
});
2 changes: 1 addition & 1 deletion api/src/routers/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ export const userRouter = createTRPCRouter({
// TODO: Can a cursor make this more efficent???

// TODO: Switch to DB
return await import("./users.json");
return [];
}),
});
1 change: 0 additions & 1 deletion api/src/routers/users.json

This file was deleted.

2 changes: 1 addition & 1 deletion forge/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,6 @@ process.on("exit", () => {
);
fs.writeFileSync(
path.join(basePath, "functions", "__nitro.func", "index.mjs"),
`var global = {};${code}`
`const global = globalThis;${code}`
);
});

0 comments on commit 4d6663f

Please sign in to comment.