From df9e61554a6a6f2f27e67babe05fe20a96063033 Mon Sep 17 00:00:00 2001 From: ilia Date: Sun, 4 Jan 2026 22:05:26 -0500 Subject: [PATCH] Mark additional API routes as dynamic to prevent build-time data collection --- app/api/admin/users/route.ts | 3 +++ app/api/debug/session/route.ts | 3 +++ app/api/photos/upload-multiple/route.ts | 3 +++ app/api/photos/upload/route.ts | 3 +++ app/api/profile/change-password/route.ts | 3 +++ 5 files changed, 15 insertions(+) diff --git a/app/api/admin/users/route.ts b/app/api/admin/users/route.ts index 1965386..7bb01c4 100644 --- a/app/api/admin/users/route.ts +++ b/app/api/admin/users/route.ts @@ -4,6 +4,9 @@ import { prisma } from "@/lib/prisma" import { hashPassword } from "@/lib/utils" import { logger } from "@/lib/logger" +// Mark this route as dynamic to prevent build-time data collection +export const dynamic = "force-dynamic" + export async function POST(req: NextRequest) { try { const session = await auth() diff --git a/app/api/debug/session/route.ts b/app/api/debug/session/route.ts index d98a890..ac1416b 100644 --- a/app/api/debug/session/route.ts +++ b/app/api/debug/session/route.ts @@ -4,6 +4,9 @@ import { cookies } from "next/headers" import { SESSION_COOKIE_NAME } from "@/lib/constants" import { logger } from "@/lib/logger" +// Mark this route as dynamic to prevent build-time data collection +export const dynamic = "force-dynamic" + /** * Debug endpoint for session inspection * ADMIN ONLY - Protected endpoint for debugging session issues diff --git a/app/api/photos/upload-multiple/route.ts b/app/api/photos/upload-multiple/route.ts index 5131a69..629a17a 100644 --- a/app/api/photos/upload-multiple/route.ts +++ b/app/api/photos/upload-multiple/route.ts @@ -31,6 +31,9 @@ import { join } from "path" import { existsSync, mkdirSync } from "fs" import { createHash } from "crypto" +// Mark this route as dynamic to prevent build-time data collection +export const dynamic = "force-dynamic" + export async function POST(req: NextRequest) { try { const session = await auth() diff --git a/app/api/photos/upload/route.ts b/app/api/photos/upload/route.ts index 8fac0e7..178f8ad 100644 --- a/app/api/photos/upload/route.ts +++ b/app/api/photos/upload/route.ts @@ -9,6 +9,9 @@ import { join } from "path" import { existsSync, mkdirSync } from "fs" import { createHash } from "crypto" +// Mark this route as dynamic to prevent build-time data collection +export const dynamic = "force-dynamic" + export async function POST(req: NextRequest) { try { const session = await auth() diff --git a/app/api/profile/change-password/route.ts b/app/api/profile/change-password/route.ts index 5358e46..753450f 100644 --- a/app/api/profile/change-password/route.ts +++ b/app/api/profile/change-password/route.ts @@ -5,6 +5,9 @@ import { logger } from "@/lib/logger" import bcrypt from "bcryptjs" import { hashPassword } from "@/lib/utils" +// Mark this route as dynamic to prevent build-time data collection +export const dynamic = "force-dynamic" + export async function POST(req: NextRequest) { try { const session = await auth()