Skip to content

Commit

Permalink
log timestamp inside checkout page.server.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
bosung90 committed Oct 14, 2023
1 parent 4a2e85c commit e18bde6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/checkout/[eventId]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export const load = async ({params}) => {

export const actions = {
default: async ({request}) => {
console.log('checkout page.server.ts is this cached? ' + new Date().valueOf())

const formData = await request.formData()
const eventId = formData.get('eventId') as string
if (!eventId) {
Expand Down Expand Up @@ -49,7 +51,6 @@ export const actions = {
} satisfies Omit<DB.Ticket, 'createdAt'>

await createTicket(ticketData)

if (ticketData.status === 'unpaid') {
throw redirect(300, `/payment?eventId=${eventId}&ticketId=${userData.id}`)
} else if (ticketData.status === 'free') {
Expand Down

0 comments on commit e18bde6

Please sign in to comment.