Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

deleteUsers(uids: string[]) Not Working

オープン
#2,419 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

@pragatimodi がすでに取り組んでいます。

2024年1月10日 から。

評価

この issue はまだ評価されていません。

説明

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...

主要言語
TypeScript
スター
1.7k
フォーク
419
平均マージ
4日 20時間
マージ済み PR(30日)
16

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

firebase/firebase-admin-node のほかの issue

firebase/firebase-admin-node の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。