fix: ensure API routes and RootLayout render dynamically in production to apply color scheme and settings updates in real time
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
import { NextResponse } from 'next/server';
|
import { NextResponse } from 'next/server';
|
||||||
import { prisma } from '@/lib/db';
|
import { prisma } from '@/lib/db';
|
||||||
|
|
||||||
|
export const dynamic = 'force-dynamic';
|
||||||
|
|
||||||
export async function GET() {
|
export async function GET() {
|
||||||
try {
|
try {
|
||||||
const routes = await prisma.route.findMany({
|
const routes = await prisma.route.findMany({
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { NextResponse } from 'next/server';
|
import { NextResponse } from 'next/server';
|
||||||
import { getSettings } from '@/lib/settings';
|
import { getSettings } from '@/lib/settings';
|
||||||
|
|
||||||
|
export const dynamic = 'force-dynamic';
|
||||||
|
|
||||||
export async function GET() {
|
export async function GET() {
|
||||||
try {
|
try {
|
||||||
const settings = await getSettings();
|
const settings = await getSettings();
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import Header from '@/components/Header';
|
|||||||
import Footer from '@/components/Footer';
|
import Footer from '@/components/Footer';
|
||||||
import { getSettings } from '@/lib/settings';
|
import { getSettings } from '@/lib/settings';
|
||||||
|
|
||||||
|
export const dynamic = 'force-dynamic';
|
||||||
|
|
||||||
export async function generateMetadata(): Promise<Metadata> {
|
export async function generateMetadata(): Promise<Metadata> {
|
||||||
const settings = await getSettings();
|
const settings = await getSettings();
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user