From a46a98f25e85c797b076df555c856e8dc66feea6 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Thu, 12 Mar 2026 00:40:28 +0800 Subject: [PATCH] feat: Add API route to fetch cities from the backend. --- frontend/app/api/cities/route.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/app/api/cities/route.ts b/frontend/app/api/cities/route.ts index 0150acd4..ba7feb78 100644 --- a/frontend/app/api/cities/route.ts +++ b/frontend/app/api/cities/route.ts @@ -2,6 +2,7 @@ import { NextResponse } from "next/server"; import { buildBackendRequestHeaders } from "@/lib/backend-auth"; const API_BASE = process.env.POLYWEATHER_API_BASE_URL; +export const dynamic = "force-dynamic"; export async function GET() { if (!API_BASE) { @@ -14,7 +15,7 @@ export async function GET() { try { const res = await fetch(`${API_BASE}/api/cities`, { headers: buildBackendRequestHeaders(), - next: { revalidate: 120 }, + cache: "no-store", }); if (!res.ok) { const raw = await res.text();