Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

102
Visualizações
Deleting data in firebase 7

Recently I came across a problem, I am making a function where you can get rid of chats in my app so I have this function

function deleteconvo() {
        const me = firebase?.auth?.currentUser?.uid;
        const members = [me, recipient.uid];
        firebase.db.collection("conversations").remove({ members }); 
    }

Firebase is telling me that:

firebase.db.collection("conversations").remove({ members }); is not a function

I also tried .delete and I cant find any answers online. Anyone have a solution to this?

note: I understand that I have to grab the docs value too, because I am in the conversation collection of the the database each conversation has its own unique ID, which I dont know how to grab and store that in a variable.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

A good starting point is the official Firestore documentation regarding how to delete data.

In that page you can find examples in different languages on how to delete documents, fields and collections.

For example to delete an entire collection or subcollection in Cloud Firestore you need to retrieve all the documents within the collection or subcollection and delete them.

And to delete a document you can use the delete() method:

const res = await db.collection('cities').doc('DC').delete();

`

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda