Mark additional API routes as dynamic to prevent build-time data collection

This commit is contained in:
ilia 2026-01-04 22:05:26 -05:00
parent da4d7e6f6e
commit df9e61554a
5 changed files with 15 additions and 0 deletions

View File

@ -4,6 +4,9 @@ import { prisma } from "@/lib/prisma"
import { hashPassword } from "@/lib/utils" import { hashPassword } from "@/lib/utils"
import { logger } from "@/lib/logger" 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) { export async function POST(req: NextRequest) {
try { try {
const session = await auth() const session = await auth()

View File

@ -4,6 +4,9 @@ import { cookies } from "next/headers"
import { SESSION_COOKIE_NAME } from "@/lib/constants" import { SESSION_COOKIE_NAME } from "@/lib/constants"
import { logger } from "@/lib/logger" 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 * Debug endpoint for session inspection
* ADMIN ONLY - Protected endpoint for debugging session issues * ADMIN ONLY - Protected endpoint for debugging session issues

View File

@ -31,6 +31,9 @@ import { join } from "path"
import { existsSync, mkdirSync } from "fs" import { existsSync, mkdirSync } from "fs"
import { createHash } from "crypto" 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) { export async function POST(req: NextRequest) {
try { try {
const session = await auth() const session = await auth()

View File

@ -9,6 +9,9 @@ import { join } from "path"
import { existsSync, mkdirSync } from "fs" import { existsSync, mkdirSync } from "fs"
import { createHash } from "crypto" 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) { export async function POST(req: NextRequest) {
try { try {
const session = await auth() const session = await auth()

View File

@ -5,6 +5,9 @@ import { logger } from "@/lib/logger"
import bcrypt from "bcryptjs" import bcrypt from "bcryptjs"
import { hashPassword } from "@/lib/utils" 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) { export async function POST(req: NextRequest) {
try { try {
const session = await auth() const session = await auth()