This commit is contained in:
2025-06-09 19:04:42 +05:00
parent 9d53a971ee
commit 90edf5e550
4 changed files with 18 additions and 13 deletions
+10 -5
View File
@@ -2,12 +2,17 @@ import { error } from "elysia";
import db from "../../db";
import { commentsTable } from "../../db/schema";
export async function createComment(
sessionId: string,
userId: string,
text: string
) {
export async function createComment({
sessionId,
userId,
text,
}: {
sessionId: string;
userId: string;
text: string;
}) {
try {
console.log(sessionId, userId, text);
const comment = await db
.insert(commentsTable)
.values({