Skip to content

Commit

Permalink
delete report
Browse files Browse the repository at this point in the history
  • Loading branch information
ptruong0 committed Feb 19, 2024
1 parent 80436d4 commit aa09837
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions site/src/component/UserReviews/UserReviews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const UserReviews: FC = () => {

const deleteReview = async (reviewID: string) => {
await axios.delete('/api/reviews', { data: { id: reviewID } });
await axios.delete('/api/reports', { data: { reviewID: reviewID } });
setReviews(reviews.filter((review) => review._id !== reviewID));
};

Expand Down

0 comments on commit aa09837

Please sign in to comment.