Relative Content

Tag Archive for pythonfirebasegoogle-cloud-platformgoogle-cloud-firestore

How to delete a key:value pair from Firebase map?

I have some code for managing a friend system using Firebase. The issue I am having is when a user accepts a friend request the request can be deleted. So this involves adding user1 to user2’s friends and user2 to user1’s friends then removing user2 from user1’s ‘ownRequests’ and removing user1 from user2’s ‘friendRequests’. I am trying to use Firestore’s DELETE_FIELD but it does not appear to work.