kaneo (minimalist kanban) fork to experiment adding a tangled integration github.com/usekaneo/kaneo
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 39e2dfae265f26c8d6d888a560f50ab2d5d58b3f 22 lines 508 B view raw
1import { HTTPException } from "hono/http-exception"; 2import db from "../../database"; 3import { commentTable } from "../../database/schema"; 4 5async function createComment(taskId: string, userId: string, content: string) { 6 const [comment] = await db 7 .insert(commentTable) 8 .values({ 9 taskId, 10 userId, 11 content, 12 }) 13 .returning(); 14 15 if (!comment) { 16 throw new HTTPException(500, { message: "Failed to create comment" }); 17 } 18 19 return comment; 20} 21 22export default createComment;