Rank 3: Container
Hello,
I am using SvelteKit and trying to send a user an invitation to the team, The email gets sent but automatically added to the team. From what i understand is that using client side this should not happen only if using the server sdk.
This is my simple function used inside my +page.svelte
try { await teamsClient.createMembership( teamId, ['staff'], undefined, id, undefined, 'http://localhost:5173/team-users' ); } catch (error) { console.log(error); } }```
This is my set up for the appwrite client:
```import { PUBLIC_APPWRITE_ENDPOINT, PUBLIC_APPWRITE_PROJECT } from "$env/static/public";import { Client, Teams } from "appwrite";
// Set up clientconst client = new Client();client.setEndpoint(PUBLIC_APPWRITE_ENDPOINT).setProject(PUBLIC_APPWRITE_PROJECT);
// Set up servicesexport const teamsClient = new Teams(client);```
Any suggestions?