修正評審評分清單失敗問題
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user