update 18 mei
This commit is contained in:
@@ -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 || []);
|
||||
|
||||
Reference in New Issue
Block a user