Skip to content

🐛 Bug Report: Documentation for Teams API has incorrect order of parameters #5910

@dokgu

Description

@dokgu

👟 Reproduction steps

Go to https://appwrite.io/docs/server/teams?sdk=nodejs-default#teamsCreateMembership and look at the example, the order of parameters are:

  1. Team ID
  2. Email
  3. Roles
  4. URL

But when using the SDK on my project, the order is actually

  1. Team ID
  2. Roles
  3. URL
  4. Email or User ID or Phone Number

👍 Expected behavior

I was expecting the documentation and the SDK to be consistent.

Actually - I would prefer if the functions just accept an object with the parameters as properties:

await teams.createMembership({
  teamId: TEAM_ID,
  userId: USER_ID,
  email: EMAIL,
  url: URL,
  roles: []
});

This way, the order in which you provide the parameters do not matter at all.

👎 Actual Behavior

The SDK and the docs aren't consistent.

🎲 Appwrite version

Version 1.3.x

💻 Operating system

Linux

🧱 Your Environment

"node-appwrite": "^9.0.0",

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingproduct / docsFixes and upgrades for the Appwrite Docs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions