refactor mylistings and my rentals
This commit is contained in:
@@ -203,8 +203,8 @@ export const itemAPI = {
|
||||
|
||||
export const rentalAPI = {
|
||||
createRental: (data: any) => api.post("/rentals", data),
|
||||
getMyRentals: () => api.get("/rentals/my-rentals"),
|
||||
getMyListings: () => api.get("/rentals/my-listings"),
|
||||
getRentals: () => api.get("/rentals/renting"),
|
||||
getListings: () => api.get("/rentals/owning"),
|
||||
getPendingRequestsCount: () => api.get("/rentals/pending-requests-count"),
|
||||
updateRentalStatus: (id: string, status: string) =>
|
||||
api.put(`/rentals/${id}/status`, { status }),
|
||||
|
||||
Reference in New Issue
Block a user