Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

deleteUsers(uids: string[]) Not Working

Aperta
#2,419 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@pragatimodi ci sta già lavorando.

Dal 10/1/2024.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

api: auth

deleteUsers is only deleting the first entry of the provided array of uid, see the following:

  • Relevant code snippet:

    --- SNIP ---
      if (httpMethod === "DELETE") {
            const { id } = event.queryStringParameters;
            if (!id) return handleError(new Error("Please provide an id."), 405);
    
            const uids = id.split(",");
            return handleDeleteRequest(tenantAuth, uids);
          }
    --- SNIP ---
    
    const handleDeleteRequest = async (tenantAuth, uids) => {
      try {
        console.log("handleDeleteRequest -> uids:", uids);
        const deleteUserResults = await tenantAuth.deleteUsers(uids);
    
        return {
          body: JSON.stringify({ results: deleteUserResults }),
          headers: { "Content-Type": "application/json" },
          statusCode: 200,
        };
      } catch (error) {
        return handleError(error);
      }
    };
    
  • uids value:

    handleDeleteRequest -> uids: [ 'cbHxLH4TtKN8tREDACTED', ' PLrrHeqlphcHP1REDACTED' ]
    Response with status 200 in 855 ms.
    
  • Server's response:

    {"results":{"failureCount":0,"successCount":2,"errors":[]}}

Although success count shows 2 when going to the console only the first user is deleted. It seems that this function is buggy...

Lingua principale
TypeScript
Stelle
1.7k
Fork
419
Merge medio
4g 20h
PR unite (30g)
16

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di firebase/firebase-admin-node

Tutte le issue di firebase/firebase-admin-node

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.