update 18 mei

This commit is contained in:
[Valentino Heman Budiarto]
2026-05-18 09:57:01 +07:00
parent 8d35ec81d8
commit 0aed7a7c01
3 changed files with 26 additions and 28 deletions
+3 -2
View File
@@ -33,9 +33,10 @@ export default function HistoryPage() {
fetchHistory(token);
}, []);
const fetchHistory = async (token: string) => {
const fetchHistory = async (token: string) => {
try {
const response = await axios.get("http://localhost:8080/api/bookings", {
// PERBAIKAN: Ubah /api/bookings menjadi /api/my-bookings
const response = await axios.get("http://localhost:8080/api/my-bookings", {
headers: { Authorization: `Bearer ${token}` },
});
setBookings(response.data.data || []);