Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

refactor: add supportsResponseStreaming in api route

Marc Seitze5ecd42739a0
diff --git a/next.config.mjs b/next.config.mjs
index f89c70dd..4acb293b 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -8,7 +8,6 @@ const nextConfig = {
},
transpilePackages: ["@trigger.dev/react"],
skipTrailingSlashRedirect: true,
- supportsResponseStreaming: true,
experimental: {
outputFileTracingIncludes: {
"/api/mupdf/*": ["./node_modules/mupdf/lib/*.wasm"],
diff --git a/pages/api/views.ts b/pages/api/views.ts
index 0e8bc5f9..b0ad5057 100644
--- a/pages/api/views.ts
+++ b/pages/api/views.ts
@@ -10,6 +10,11 @@ import prisma from "@/lib/prisma";
import { parseSheet } from "@/lib/sheet";
import { checkPassword, decryptEncrpytedPassword, log } from "@/lib/utils";
+export const config = {
+ // in order to enable `waitUntil` function
+ supportsResponseStreaming: true,
+};
+
export default async function handle(
req: NextApiRequest,
res: NextApiResponse,