import { NextResponse } from "next/server"; import { checkForUpdate } from "@/lib/update"; // GET /api/update/check - 检查是否有可用更新 export async function GET() { try { const versionInfo = await checkForUpdate(); return NextResponse.json({ success: true, data: versionInfo, }); } catch (error) { return NextResponse.json( { success: false, error: "检查更新失败" }, { status: 500 } ); } }