fixes
This commit is contained in:
@@ -16,15 +16,13 @@ export const commentsController = new Elysia({ prefix: "comments" })
|
||||
}
|
||||
)
|
||||
.post(
|
||||
"/:sessionId",
|
||||
async ({ params: { sessionId }, auth: { userId }, body: { text } }) =>
|
||||
await createComment(sessionId, userId, text),
|
||||
"/",
|
||||
async ({ auth: { userId }, body: { text, sessionId } }) =>
|
||||
await createComment({ userId, text, sessionId }),
|
||||
{
|
||||
params: t.Object({
|
||||
sessionId: t.String(),
|
||||
}),
|
||||
body: t.Object({
|
||||
text: t.String(),
|
||||
sessionId: t.String(),
|
||||
}),
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user