deleteUsers(uids: string[]) Not Working
@pragatimodi is already working on this.
Since Jan 10, 2024.
Assessment
This issue has not been assessed yet.
Description
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); } }; -
uidsvalue: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...
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 419
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 16
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/firebase-admin-node
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
firebase/firebase-admin-node#3234 ·
-
firebase/firebase-admin-node#3221 · 3 comments · 1 assignee ·
-
api: messaging
Difficulty 3/5 1-2 days Newbie friendliness 70/100
firebase/firebase-admin-node#3215 ·
-
api: messaging
Difficulty 5/5 Over a week Newbie friendliness 28/100
firebase/firebase-admin-node#3214 ·
-
api: firestore type: feature request
firebase/firebase-admin-node#3183 · 1 comment · 1 assignee ·
All issues in firebase/firebase-admin-node
Similar issues
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Crush Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ElementsProject/cln-application#167 · 1 comment · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Quantco/pnpm-licenses#17 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100