admin can soft delete listings
This commit is contained in:
1 parent
88c831419c
commit
b2f18d77f6
11 files changed
+773
-22
No files matched your search
@@ -202,6 +202,10 @@ export const itemAPI = {
|
||||
deleteItem: (id: string) => api.delete(`/items/${id}`),
|
||||
getRecommendations: () => api.get("/items/recommendations"),
|
||||
getItemReviews: (id: string) => api.get(`/items/${id}/reviews`),
|
||||
// Admin endpoints
|
||||
adminSoftDeleteItem: (id: string, reason: string) =>
|
||||
api.delete(`/items/admin/${id}`, { data: { reason } }),
|
||||
adminRestoreItem: (id: string) => api.patch(`/items/admin/${id}/restore`),
|
||||
};
|
||||
|
||||
export const rentalAPI = {
|
||||
|
||||
Reference in new issue
Block a user