···1import { recentTakes } from "./routes/recentTakes";
2import video from "./routes/video";
3import { handleApiError } from "../../libs/apiError";
045export { default as video } from "./routes/video";
6···13 return await video(url);
14 case "recentTakes":
15 return await recentTakes(url);
0016 default:
17 return new Response(
18 JSON.stringify({ error: "Route not found" }),
···1import { recentTakes } from "./routes/recentTakes";
2import video from "./routes/video";
3import { handleApiError } from "../../libs/apiError";
4+import { projects } from "./routes/projects";
56export { default as video } from "./routes/video";
7···14 return await video(url);
15 case "recentTakes":
16 return await recentTakes(url);
17+ case "projects":
18+ return await projects(url);
19 default:
20 return new Response(
21 JSON.stringify({ error: "Route not found" }),
···3import handleHelp from "../handlers/help";
4import { handleHistory } from "../handlers/history";
5import handleHome from "../handlers/home";
06import upload from "../services/upload";
7import type { MessageResponse } from "../types";
8import * as Sentry from "@sentry/bun";
···70 Sentry.captureException(error, {
71 extra: {
72 context: "upload setup",
0000000000073 },
74 });
75 }
···3import handleHelp from "../handlers/help";
4import { handleHistory } from "../handlers/history";
5import handleHome from "../handlers/home";
6+import { setupSubmitListener } from "../handlers/setup";
7import upload from "../services/upload";
8import type { MessageResponse } from "../types";
9import * as Sentry from "@sentry/bun";
···71 Sentry.captureException(error, {
72 extra: {
73 context: "upload setup",
74+ },
75+ });
76+ }
77+78+ // setup the setup view handler
79+ try {
80+ setupSubmitListener();
81+ } catch (error) {
82+ Sentry.captureException(error, {
83+ extra: {
84+ context: "submit modal setup",
85 },
86 });
87 }
+14
src/features/takes/setup/commands.ts
···5import * as Sentry from "@sentry/bun";
6import { blog } from "../../../libs/Logger";
7import handleHome from "../handlers/home";
000089export default function setupCommands() {
10 // Main command handler
···19 const subcommand = args[0]?.toLowerCase() || "";
2021 let response: MessageResponse | undefined;
00000000002223 // Route to the appropriate handler function
24 switch (subcommand) {
···5import * as Sentry from "@sentry/bun";
6import { blog } from "../../../libs/Logger";
7import handleHome from "../handlers/home";
8+import { db } from "../../../libs/db";
9+import { users as usersTable } from "../../../libs/schema";
10+import { eq } from "drizzle-orm";
11+import { handleSetup } from "../handlers/setup";
1213export default function setupCommands() {
14 // Main command handler
···23 const subcommand = args[0]?.toLowerCase() || "";
2425 let response: MessageResponse | undefined;
26+27+ const userFromDB = await db
28+ .select()
29+ .from(usersTable)
30+ .where(eq(usersTable.id, userId));
31+32+ if (userFromDB.length === 0) {
33+ await handleSetup(context.triggerId as string);
34+ return;
35+ }
3637 // Route to the appropriate handler function
38 switch (subcommand) {