fix: add debugger review path

This commit is contained in:
Mahen 2026-05-19 19:48:43 +07:00
parent 3c8b8a32ad
commit 130c69eede
1 changed files with 10 additions and 1 deletions

View File

@ -15,10 +15,19 @@ export const useReviewTable = (
const getReviewData = async () => {
try {
setIsLoading(true);
console.log(reviewPath);
// 1. CEK URL SEBELUM FETCH: Pastikan tidak ada kata "undefined" di console browser
console.log("Menembak ke URL:", reviewPath);
const req = await fetch(reviewPath);
// 2. CEK STATUS HTTP: Pastikan statusnya 200 OK, bukan 404 atau 500
console.log("HTTP Status:", req.status);
const res: ApiResponse = await req.json();
// 3. CEK STRUKTUR PAYLOAD: Lihat isi JSON asli dari FastAPI di deploy mode
console.log("Raw Response dari Backend:", res);
if (res.data && Array.isArray(res.data)) {
setData(res.data);
} else {