This commit is contained in:
eric
2025-11-13 05:05:53 +08:00
parent cbdc65f56e
commit 891af61146
691 changed files with 83952 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import { NextResponse } from 'next/server'
import navigationData from '@/navsphere/content/navigation.json'
export const runtime = 'edge'
export async function GET() {
try {
return NextResponse.json(navigationData, {
headers: {
'Cache-Control': 's-maxage=3600, stale-while-revalidate',
'Content-Type': 'application/json'
}
})
} catch (error) {
console.error('Error in navigation API:', error)
return NextResponse.json(
{ error: '获取导航数据失败' },
{
status: 500,
headers: {
'Content-Type': 'application/json'
}
}
)
}
}

View File

@@ -0,0 +1,16 @@
import { NextResponse } from 'next/server'
import siteData from '@/navsphere/content/site.json'
export const runtime = 'edge'
export async function GET() {
try {
return NextResponse.json(siteData)
} catch (error) {
console.error('Error in site API:', error)
return NextResponse.json(
{ error: '获取站点数据失败' },
{ status: 500 }
)
}
}