a fun bot for the hc slack

chore: only listen to files in dms and fix video api

dunkirk.sh 381ee8a0 b458314c

verified
+5 -2
+3 -2
src/features/api/routes/video.ts
··· 5 5 6 6 export default async function getVideo(url: URL): Promise<Response> { 7 7 try { 8 - const videoId = url.pathname.split("/")[2]; 9 - const thumbnail = url.pathname.split("/")[3] === "thumbnail"; 8 + const path = url.pathname.split("/").filter(Boolean); 9 + const videoId = path[2]; 10 + const thumbnail = path[3] === "thumbnail"; 10 11 11 12 if (!videoId) { 12 13 return new Response(JSON.stringify({ error: "Invalid video id" }), {
+2
src/features/takes/services/upload.ts
··· 13 13 14 14 if (!user) return; 15 15 16 + if (!payload.channel.startsWith("D")) return; 17 + 16 18 const takesNeedUpload = await db 17 19 .select() 18 20 .from(takesTable)