整合資料庫、完成登入註冊忘記密碼功能

This commit is contained in:
2025-09-09 12:00:22 +08:00
parent af88c0f037
commit 32b19e9a0f
85 changed files with 11672 additions and 2350 deletions

27
scripts/test-api-debug.js Normal file
View File

@@ -0,0 +1,27 @@
async function testApiDebug() {
console.log('🧪 調試 API 錯誤...\n');
try {
// 測試用戶列表 API
console.log('1. 測試用戶列表 API...');
const response = await fetch('http://localhost:3000/api/admin/users');
console.log('狀態碼:', response.status);
console.log('狀態文本:', response.statusText);
const data = await response.text();
console.log('響應內容:', data);
if (response.ok) {
const jsonData = JSON.parse(data);
console.log('✅ API 成功:', jsonData);
} else {
console.log('❌ API 失敗');
}
} catch (error) {
console.error('❌ 測試過程中發生錯誤:', error);
}
}
testApiDebug();