fix create new entry endpoint
This commit is contained in:
@@ -9,7 +9,6 @@ export async function POST({ request }) {
|
|||||||
try {
|
try {
|
||||||
const body = await request.json();
|
const body = await request.json();
|
||||||
const entry: typeof entryTable.$inferInsert = body
|
const entry: typeof entryTable.$inferInsert = body
|
||||||
entry.date = new Date(body.date)
|
|
||||||
|
|
||||||
await db.insert(entryTable).values(entry)
|
await db.insert(entryTable).values(entry)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user