Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix: Comment auth error
Richie McIlroy03fdae0c9947
diff --git a/apps/web/app/api/video/comment/route.ts b/apps/web/app/api/video/comment/route.tsindex f944badc9..95cf5df84 100644--- a/apps/web/app/api/video/comment/route.ts+++ b/apps/web/app/api/video/comment/route.ts@@ -10,7 +10,8 @@ async function handlePost(request: NextRequest) {const user = await getCurrentUser();const { type, content, videoId, timestamp, parentCommentId } =await request.json();- const userId = user?.id as string;++ const userId = user?.id || "anonymous";if (!type || !content || !videoId) {console.error("Missing required data in /api/video/comment/route.ts");@@ -27,7 +28,7 @@ async function handlePost(request: NextRequest) {await db.insert(comments).values({id: id,- authorId: userId ?? "anonymous",+ authorId: userId,type: type,content: content,videoId: videoId,