Fixed createdAt
This commit is contained in:
parent
6c6589250d
commit
b4c0b3bd53
3 changed files with 4 additions and 0 deletions
|
@ -132,6 +132,7 @@ export async function PUT(
|
|||
oldRoom &&
|
||||
(await db.insert(logs).values({
|
||||
id: `log_${createId()}`,
|
||||
created_at: Date.now().toString(),
|
||||
userId: userId || "",
|
||||
roomId: params.roomId,
|
||||
scale: oldRoom.scale,
|
||||
|
|
|
@ -29,6 +29,7 @@ export async function PUT(
|
|||
.insert(votes)
|
||||
.values({
|
||||
id: `vote_${createId()}`,
|
||||
created_at: Date.now().toString(),
|
||||
value: reqBody.value,
|
||||
userId: userId || "",
|
||||
roomId: params.roomId,
|
||||
|
@ -36,6 +37,7 @@ export async function PUT(
|
|||
.onConflictDoUpdate({
|
||||
target: [votes.userId, votes.roomId],
|
||||
set: {
|
||||
created_at: Date.now().toString(),
|
||||
value: reqBody.value,
|
||||
userId: userId || "",
|
||||
roomId: params.roomId,
|
||||
|
|
|
@ -50,6 +50,7 @@ export async function POST(request: Request) {
|
|||
.insert(rooms)
|
||||
.values({
|
||||
id: `room_${createId()}`,
|
||||
created_at: Date.now().toString(),
|
||||
userId: userId || "",
|
||||
roomName: reqBody.name,
|
||||
storyName: "First Story!",
|
||||
|
|
Loading…
Add table
Reference in a new issue