fix static rendering of api routes

This commit is contained in:
Torben Haack 2024-10-09 12:41:19 +02:00
parent 4d7157b13a
commit 0d349eda61
3 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,7 @@
import fs from "node:fs";
export const dynamic = 'force-dynamic';
export async function GET() {
return new Response(fs.readFileSync("./db/sqlite.db"));
}

View File

@ -2,6 +2,8 @@ import { db } from "@/server/db";
import { printJobs } from "@/server/db/schema";
import { eq } from "drizzle-orm";
export const dynamic = 'force-dynamic'
interface RemainingTimeRouteProps {
params: {
jobId: string;

View File

@ -1,5 +1,7 @@
import { getPrinters } from "@/server/actions/printers";
export const dynamic = 'force-dynamic';
export async function GET() {
const printers = await getPrinters();