Initial commit with 2026 World Cup Quant Platform core modules and CI/CD

This commit is contained in:
QuantBot
2026-06-13 23:18:18 +08:00
commit 073abf98c1
155 changed files with 19539 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import { NextResponse } from 'next/server';
const ANALYTICS_BACKEND = process.env.ANALYTICS_BACKEND_URL || 'http://127.0.0.1:8000';
export async function GET(_: Request, { params }: { params: Promise<{ matchId: string }> }) {
try {
const { matchId } = await params;
const response = await fetch(`${ANALYTICS_BACKEND}/analytics/matches/${matchId}`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
});
if (!response.ok) {
const message = await response.text();
return NextResponse.json({ message }, { status: response.status });
}
const data = (await response.json()) as Record<string, unknown>;
return NextResponse.json(data);
} catch (error) {
const message = error instanceof Error ? error.message : '賽事預測服務暫時無法連線';
return NextResponse.json({ message }, { status: 502 });
}
}

View File

@@ -0,0 +1,25 @@
import { NextResponse } from 'next/server';
const ANALYTICS_BACKEND = process.env.ANALYTICS_BACKEND_URL || 'http://127.0.0.1:8000';
export async function GET() {
try {
const response = await fetch(`${ANALYTICS_BACKEND}/analytics/matches`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
});
if (!response.ok) {
const message = await response.text();
return NextResponse.json({ message }, { status: response.status });
}
const data = (await response.json()) as Record<string, unknown>;
return NextResponse.json(data);
} catch (error) {
const message = error instanceof Error ? error.message : '賽事列表服務暫時無法連線';
return NextResponse.json({ message }, { status: 502 });
}
}