Skip to content

Commit

Permalink
use epoch time
Browse files Browse the repository at this point in the history
  • Loading branch information
spcbfr committed Mar 25, 2024
1 parent ef00e71 commit 36d66a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/api/micropub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@ export async function POST({ request, site, url }: APIContext) {
const records = await db.insert(Note).values({
content: formBodyObject.content
}).returning()
console.log(records)

return new Response(null, {
statusText: "Created",
status: 201,
headers: {
"Location": "https://yusuf.fyi/notes/" + records[0].published
"Location": "https://yusuf.fyi/notes/" + records[0].published.getTime()
}
})
}
Expand Down

0 comments on commit 36d66a0

Please sign in to comment.