social_media_app icon indicating copy to clipboard operation
social_media_app copied to clipboard

Unable to implement delete post feature.

Open abhijitpati11 opened this issue 1 year ago • 2 comments

While implementing the delete post function i am unable to delete it. Below given is the snapshots of the code, the main handler is in the 'postDetail-ss' mutation function is in 'queryAndMutations-ss' and api is in 'API-ss' while debugging i found that the api-function is not being executed. Kindly help with this problem, any help and guidance will be appreciated. postDetail-ss

queryAndMutations-ss

API-ss

abhijitpati11 avatar Feb 06 '24 14:02 abhijitpati11

anyone help plzzzzzzz

abhijitpati11 avatar Feb 10 '24 16:02 abhijitpati11

@abhijitpati11 Not sure if you got the same problem as me but when I was trying to delete post, if they were saved, then it wouldn't delete. While if they weren't saved, it would be deleted. So, what you've to do is, go to appwrite -> databases -> select your database -> Posts -> "Attributes" tab -> select the 3 dots on the right side of the "save" attribute -> click Edit and then scroll to "On deleting a document" and finally select "Cascade - delete all related documents" and click "Update". You should be able to delete posts now.

Matx99 avatar Mar 08 '24 18:03 Matx99