Deleting a specific document based on the user reference

Database & APIs

I have a user collection and a subcollection for pending requests. When an authenticated user follows a private account, the follow request is added to the pending requests subcollection. If the user accidentally clicks to follow and wants to undo it, they can click on "Cancel Request."

I want the "Cancel Request" feature to delete the specific document associated with the authenticated user from the subcollection. However, currently, when I click "Cancel Request," it deletes the first document in the subcollection instead of the one linked to the authenticated user.

What have you tried so far?

I have tried using firestore backend delete query and it doesn't work because idk how I can specify who I want it to search and delete. I need help please.

Did you check FlutterFlow's Documentation for this topic?
Yes
1