mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-04 19:51:51 +02:00
♻️ Use synchronous id generation (#645)
This commit is contained in:
parent
27bbe6f947
commit
ffa7007184
9 changed files with 12 additions and 27 deletions
|
@ -33,14 +33,12 @@ export const comments = router({
|
|||
}),
|
||||
)
|
||||
.mutation(async ({ ctx, input: { pollId, authorName, content } }) => {
|
||||
const user = ctx.session.user;
|
||||
|
||||
const newComment = await prisma.comment.create({
|
||||
data: {
|
||||
content,
|
||||
pollId,
|
||||
authorName,
|
||||
userId: user.id,
|
||||
userId: ctx.user.id,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue