Web Developer
I am having a bit a database issue. I am making a music review website and I have successfully been able to create and update reviews as a dummy user, but no matter what I try I am unable to delete them. The way I have my database set up is that I have two separate tables: profiles and reviews. everything in the profiles table works when it comes to create/update/delete, but for some reason not in the reviews table. the corresponding userID does populate with their review in the reviews table as well. I have even tried playing around with permissions and even if I set the role to Any, it won't work. Has anyone else encountered this issue?
here's my delete funtion:
async function deleteReview(id){
try {
await dbDeleteReview(id);
await renderReviews();
} catch (error) {
console.error('Delete review error:', error);
alert('Failed to delete review: ' + error.message);
}
}