[PR #4662] [MERGED] docs(organization): fix incorrect usage example for listTeams #5512

Closed
opened 2026-03-13 12:25:34 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4662
Author: @tauromu
Created: 9/15/2025
Status: Merged
Merged: 9/15/2025
Merged by: @himself65

Base: canaryHead: docs/fix-organization-plugin-listTeams


📝 Commits (2)

  • 64743f7 docs(organization): update team listing query parameters to include filtering options
  • 4babc19 Merge branch 'canary' into docs/fix-organization-plugin-listTeams

📊 Changes

1 file changed (+8 additions, -3 deletions)

View changed files

📝 docs/content/docs/plugins/organization.mdx (+8 -3)

📄 Description

What

  • Fixed the usage example of authClient.organization.listTeams in the documentation.
  • Updated the code snippet to use query.organizationId instead of organizationId.

Why

  • As reported in #1674,
    directly passing organizationId causes the request to be sent as POST and results in a 404 error.
  • The correct way is to pass it under query.

How

  • Verified locally that:
    • Without organizationId, it defaults to the active organization and returns results.
    • With query: { organizationId: "organization-id" }, it correctly fetches teams.

Summary by cubic

Corrected the docs for authClient.organization.listTeams to pass organizationId via query: { organizationId } instead of a top-level option. This matches the actual API behavior, avoids POST/404 errors, and clarifies the default to the active organization when omitted.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4662 **Author:** [@tauromu](https://github.com/tauromu) **Created:** 9/15/2025 **Status:** ✅ Merged **Merged:** 9/15/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `docs/fix-organization-plugin-listTeams` --- ### 📝 Commits (2) - [`64743f7`](https://github.com/better-auth/better-auth/commit/64743f730fa11947de7363f0f934aa48519470d7) docs(organization): update team listing query parameters to include filtering options - [`4babc19`](https://github.com/better-auth/better-auth/commit/4babc19fbf4174c31ace8a570d180c986ec48bdc) Merge branch 'canary' into docs/fix-organization-plugin-listTeams ### 📊 Changes **1 file changed** (+8 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/organization.mdx` (+8 -3) </details> ### 📄 Description ### What - Fixed the usage example of `authClient.organization.listTeams` in the documentation. - Updated the code snippet to use `query.organizationId` instead of `organizationId`. ### Why - As reported in [#1674](https://github.com/better-auth/better-auth/issues/1674), directly passing `organizationId` causes the request to be sent as POST and results in a 404 error. - The correct way is to pass it under `query`. ### How - Verified locally that: - Without `organizationId`, it defaults to the active organization and returns results. - With `query: { organizationId: "organization-id" }`, it correctly fetches teams. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Corrected the docs for authClient.organization.listTeams to pass organizationId via query: { organizationId } instead of a top-level option. This matches the actual API behavior, avoids POST/404 errors, and clarifies the default to the active organization when omitted. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 12:25:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#5512