Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 tasks done
dokgu opened this issue Jul 30, 2023 · 4 comments
Closed
2 tasks done
Assignees
Labels
bug Something isn't working product / docs Fixes and upgrades for the Appwrite Docs.

Comments

@dokgu
Copy link

dokgu commented Jul 30, 2023

👟 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?

@dokgu dokgu added the bug Something isn't working label Jul 30, 2023
@shaikahmadnawaz
Copy link

Can I work on this issue?

@joeyouss joeyouss added the product / docs Fixes and upgrades for the Appwrite Docs. label Jul 31, 2023
@joeyouss joeyouss self-assigned this Jul 31, 2023
@joeyouss
Copy link

This has been fixed, not released yet: appwrite/docs#381

@shaikahmadnawaz
Copy link

Okay, thank you @joeyouss

@joeyouss
Copy link

joeyouss commented Aug 7, 2023

Closing this issue in favor of PR appwrite/docs#381

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / docs Fixes and upgrades for the Appwrite Docs.
Projects
None yet
Development

No branches or pull requests

3 participants