mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
feat: dynamic invite to org link
This commit is contained in:
1 parent
7f7d375f50
commit
1a6dad033b
1 file changed
+13
@@ -0,0 +1,13 @@
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import { base } from '$app/paths';
|
||||
import type { PageLoad } from './$types';
|
||||
|
||||
export const load: PageLoad = async ({ parent }) => {
|
||||
const { organizations, account } = await parent();
|
||||
|
||||
const teamId = account.prefs.organization ?? organizations.teams[0]?.$id;
|
||||
if (teamId) {
|
||||
redirect(303, `${base}/organization-${teamId}/members`);
|
||||
}
|
||||
redirect(303, base);
|
||||
};
|
||||
Reference in new issue
Block a user