Also, what version of Appwrite you're using?
There
The latest version
I'm working with the cloud
And last the createTeamMebership code?
It's there
It's interesting but the createMemebership has a different signature then the one you see online.
https://github.com/appwrite/sdk-for-node/blob/master/lib/services/teams.js#L231
Try this in your code
const membership = await teams.createMembership(
teamID,
roles,
redirectUrl,
userEmail
);
Because the order is different you've sent the redirectUrl as email and it wasn't an email.
Alright
It works fine. Thanks
I don't even know how I missed that.
<:appwritefire:823999000330895380>
It's not on you The order on the docs aren't clear (correct)
Yeah. But it's kind of the norm that optional parameters come after the mandatory ones.
I think it meant to be to other langauges that you can choose and have named parameters.
That's right
roles should be above though
if its a required param
Ohh., sure also this Agreed.
You can upvote it https://github.com/appwrite/appwrite/issues/5676
I'm actually surprised roles is required 😅
😂 So maybe the issue will get an upvote from you.
👍
Recommended threads
- Failed to create function
Hey everyone 👋 I'm having an issue creating Functions on Appwrite Cloud and I'm not sure if it's a platform bug or something wrong in my project. When I try t...
- Function deployment failed: Unable to re...
Hi Appwrite team, I have been experiencing persistent errors when i attempt to push my appwrite functions. The logs on the deployment detail page on the console...
- One to many 2 way, console UI not correc...
Hey, seems I'm facing the exactly same issue with this one: https://github.com/appwrite/appwrite/issues/6016 Since this Github issue stay open for so long, let ...