mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
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:
parent
48ee651aaa
commit
ec380343ad
@ -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');
|
||||
```
|
||||
```
|
||||
|
||||
Loading…
Reference in New Issue
Block a user