refactor: Consolidate configuration management with Zustand store

This commit is contained in:
beilunyang
2025-03-01 10:29:50 +08:00
parent b1d898e298
commit ea7fd5490c
12 changed files with 110 additions and 129 deletions

View File

@@ -1,18 +0,0 @@
import { getRequestContext } from "@cloudflare/next-on-pages"
import { NextResponse } from "next/server"
export const runtime = "edge"
export async function GET() {
try {
const domainString = await getRequestContext().env.SITE_CONFIG.get("EMAIL_DOMAINS")
return NextResponse.json({ domains: domainString ? domainString.split(',') : ["moemail.app"] })
} catch (error) {
console.error('Failed to fetch domains:', error)
return NextResponse.json(
{ error: "获取域名列表失败" },
{ status: 500 }
)
}
}