From ec380343ad21552ff896a10b00a5a561f7f1f4bc Mon Sep 17 00:00:00 2001 From: roocell Date: Mon, 24 Jun 2024 04:25:37 -0400 Subject: [PATCH] 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. --- docs/fern/docs/pages/getting-started/teams.mdx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/fern/docs/pages/getting-started/teams.mdx b/docs/fern/docs/pages/getting-started/teams.mdx index c70c90aa0..f7f048411 100644 --- a/docs/fern/docs/pages/getting-started/teams.mdx +++ b/docs/fern/docs/pages/getting-started/teams.mdx @@ -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'); -``` \ No newline at end of file +```