I have a collection with a lot of documents in Firestore Database. I wrote a function to update the data of a document in React.
try {
await firebase.app
.firestore()
.collection("Records")
.doc(recordId)
.update({ public: value, _author: UserProfile.getEmail() });
return {
status: status.SUCCESS
}
} catch(error) {
return {
status: status.INTERNAL_SERVER_ERROR
}
}
I am updating the document as an authenticated user, and for other documents, the update function works correctly. But it doen’t work only for a few records.
I checked the permission of the user in Authentication of Firebase. Everything was enabled there.