Skip to content

Commit

Permalink
fix: db update (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmbanan666 authored Feb 18, 2025
1 parent a08b2ae commit 1269c40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/database/src/repository/checkout.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CheckoutDraft } from '../types'
import { asc, desc, eq } from 'drizzle-orm'
import { asc, desc, eq, sql } from 'drizzle-orm'
import { useDatabase } from '../database'
import { checkoutLines, checkouts } from '../tables'

Expand Down Expand Up @@ -112,8 +112,8 @@ export class Checkout {

await tx.update(checkouts)
.set({
updatedAt: new Date().toString(),
totalPrice,
updatedAt: sql`NOW()`,
})
.where(eq(checkouts.id, checkout.id))
})
Expand Down

0 comments on commit 1269c40

Please sign in to comment.