Skip to content

Commit

Permalink
Serialize bigint on duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
evmiguel committed Apr 11, 2024
1 parent 0c767fc commit 90b5362
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/api/purchase/duplicate/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import prisma from "@/lib/prisma";
import { NextRequest, NextResponse } from "next/server";

// @ts-ignore
BigInt.prototype.toJSON = function () {
return this.toString();
}
export async function POST(request: NextRequest) {
const res = await request.json();
const { date, cost } = res;
Expand Down

0 comments on commit 90b5362

Please sign in to comment.