修正評審評分清單失敗問題

This commit is contained in:
2025-09-21 01:30:26 +08:00
parent 049b53fa43
commit a36ab3c98d
17 changed files with 251 additions and 274 deletions

View File

@@ -7,19 +7,14 @@ import { db } from '@/lib/database';
export async function GET(request: NextRequest) {
try {
console.log('🧪 開始測試資料庫連接...');
// 測試基本查詢
const result = await db.query('SELECT 1 as test');
console.log('✅ 基本查詢成功:', result);
// 測試競賽表
const competitions = await db.query('SELECT id, name, type FROM competitions WHERE is_active = TRUE LIMIT 3');
console.log('✅ 競賽查詢成功:', competitions);
// 測試評審表
const judges = await db.query('SELECT id, name, title FROM judges WHERE is_active = TRUE LIMIT 3');
console.log('✅ 評審查詢成功:', judges);
return NextResponse.json({
success: true,