diff --git a/back/src/auth/auth.controller.ts b/back/src/auth/auth.controller.ts index eabdd6d..8322c40 100644 --- a/back/src/auth/auth.controller.ts +++ b/back/src/auth/auth.controller.ts @@ -7,7 +7,8 @@ import { Req, Post, Body, - BadRequestException + BadRequestException, + Param } from '@nestjs/common' import { Response, Request } from 'express' @@ -60,10 +61,10 @@ export class AuthController { await this.authService.sendConfirmationEmail(user) } - @Post('/verify') + @Get('/verify/:code') @Redirect(`http://${frontHost}:${frontPort}`) - async Verify (@Body() body: any): Promise { - await this.authService.verifyAccount(body.code) + async Verify (@Param("code") code: string): Promise { + await this.authService.verifyAccount(code) } @Get('profile') diff --git a/back/src/auth/mails/confirm.hbs b/back/src/auth/mails/confirm.hbs index fbcb9c5..3490d4e 100644 --- a/back/src/auth/mails/confirm.hbs +++ b/back/src/auth/mails/confirm.hbs @@ -8,8 +8,8 @@

Hello {{username}}!

Once you clicked on the next verify button, you will have access to the app

-
- -
+ diff --git a/front/src/App.svelte b/front/src/App.svelte index 767d56a..31d7b3b 100644 --- a/front/src/App.svelte +++ b/front/src/App.svelte @@ -89,7 +89,7 @@ onMount(() => { if (window.location.pathname === "/profile") - history.replaceState({ appState: APPSTATE.PROFILE }, "", APPSTATE.PROFILE); + appState = APPSTATE.PROFILE; else history.replaceState({ appState: "" }, "", "/"); window.onpopstate = (e: PopStateEvent) => { diff --git a/front/src/components/Friends.svelte b/front/src/components/Friends.svelte index fb7f4cc..c0ed3a6 100644 --- a/front/src/components/Friends.svelte +++ b/front/src/components/Friends.svelte @@ -72,7 +72,7 @@
-

{$store.username} friends:

+

Friends:

{#if friends.length > 0}
{#each friends as friend} @@ -88,7 +88,7 @@ {:else}

No friends to display

{/if} -

{$store.username} invits:

+

Invitations:

{#if invits.length > 0}
{#each invits as invit}