fix: add BigInt JSON serialization patch for Prisma BigInt columns
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 26s

UploadedFile.sizeBytes is BigInt → JSON.stringify throws TypeError.
Add BigInt.prototype.toJSON to convert to Number globally.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
WangDL 2026-05-24 20:38:46 +08:00
parent e36f9c9785
commit ee5ebb5766

View File

@ -1,3 +1,6 @@
// Patch BigInt JSON serialization (Prisma returns BigInt for BigInt columns)
;(BigInt.prototype as any).toJSON = function () { return Number(this) };
import { NestFactory } from '@nestjs/core';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import { AppModule } from './app.module';