benerin lagi
This commit is contained in:
parent
c821d9795d
commit
720a36642c
@ -13,7 +13,7 @@ export default function ApprovalsPage() {
|
|||||||
try {
|
try {
|
||||||
const token = localStorage.getItem("token");
|
const token = localStorage.getItem("token");
|
||||||
// Mengambil dari fungsi GetAllBookings di backend
|
// Mengambil dari fungsi GetAllBookings di backend
|
||||||
const res = await axios.get("http://172.17.110.6:8080/api/bookings", {
|
const res = await axios.get("http://172.17.172.17:8080/api/bookings", {
|
||||||
headers: { Authorization: `Bearer ${token}` }
|
headers: { Authorization: `Bearer ${token}` }
|
||||||
});
|
});
|
||||||
setBookings(res.data.data);
|
setBookings(res.data.data);
|
||||||
|
|||||||
@ -36,7 +36,7 @@ export default function HistoryPage() {
|
|||||||
const fetchHistory = async (token: string) => {
|
const fetchHistory = async (token: string) => {
|
||||||
try {
|
try {
|
||||||
// PERBAIKAN: Ubah /api/bookings menjadi /api/my-bookings
|
// PERBAIKAN: Ubah /api/bookings menjadi /api/my-bookings
|
||||||
const response = await axios.get("http://172.17.110.6:8080/api/my-bookings", {
|
const response = await axios.get("http://172.17.172.17:8080/api/bookings/history", {
|
||||||
headers: { Authorization: `Bearer ${token}` },
|
headers: { Authorization: `Bearer ${token}` },
|
||||||
});
|
});
|
||||||
setBookings(response.data.data || []);
|
setBookings(response.data.data || []);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user