Doc update for teams (#91)

* Update teams.mdx

remove user from team had non-existent API call

* Update teams.mdx

doc had non-existent removeUserFromTeam method.
This commit is contained in:
roocell 2024-06-24 04:25:37 -04:00 committed by GitHub
parent 48ee651aaa
commit ec380343ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,13 +123,11 @@ await team.update({
### Remove a User from a Team
To remove a user from a team, you can call the `removeUserFromTeam` method on the `stackServerApp`, this is an example:
To remove a user from a team, you can call the `removeUser` method on the `team`, this is an example:
```tsx
await stackServerApp.removeUserFromTeam({
teamId: team.id,
userId: user.id,
});
const team = await stackServerApp.getTeam(teamId);
await team?.removeUser(userId);
```
### List All the Members of a Team
@ -247,4 +245,4 @@ To revoke a permission from a user, you can call the `revokePermission` method o
const team = await stackServerApp.getTeam('teamId');
const user = await stackServerApp.getUser();
await user.revokePermission(team, 'read');
```
```