Presently, my database stores user information. The unique identifier for each document is the user's initial name upon registration, even though this name may have been changed at a later time without updating the document's name.
My dilemma is how to locate a document by name in order to delete it.
I attempted using
"db.collection('Users').where('user_id', '==', this.user.uid)"
This code is successfully used elsewhere to associate authentication with user profiles, but I am uncertain how to delete the entire document as calling ".delete()" immediately after causes errors.
Does anyone have suggestions or solutions?