Skip to content

Commit

Permalink
fix invitation
Browse files Browse the repository at this point in the history
  • Loading branch information
TorstenDittmann committed Oct 28, 2022
1 parent 27e045a commit 94ef81b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/routes/invite/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<script lang="ts">
import { goto, invalidate } from '$app/navigation';
import { goto } from '$app/navigation';
import { base } from '$app/paths';
import { Button, Form, FormList, InputChoice } from '$lib/elements/forms';
import { addNotification } from '$lib/stores/notifications';
import { sdkForConsole } from '$lib/stores/sdk';
import { Unauthenticated } from '$lib/layout';
import { page } from '$app/stores';
import { onMount } from 'svelte';
import { Dependencies } from '$lib/constants';
let teamId: string, membershipId: string, userId: string, secret: string;
let terms = false;
Expand All @@ -22,12 +21,11 @@
const acceptInvite = async () => {
try {
await sdkForConsole.teams.updateMembershipStatus(teamId, membershipId, userId, secret);
invalidate(Dependencies.ACCOUNT);
addNotification({
type: 'success',
message: 'Successfully logged in.'
});
await goto(`${base}/console`);
await goto(`${base}/console/organization-${teamId}`);
} catch (error) {
addNotification({
type: 'error',
Expand Down

0 comments on commit 94ef81b

Please sign in to comment.