diff --git a/back/src/auth/auth.controller.ts b/back/src/auth/auth.controller.ts index b63d71c..f31b9f7 100644 --- a/back/src/auth/auth.controller.ts +++ b/back/src/auth/auth.controller.ts @@ -97,7 +97,9 @@ export class AuthController { @UseGuards(JwtAuthGuard) @Put('reverify') async reverify(@Request() req: any): Promise { - await this.authService.sendVerifyMail(req.user); + const user = await this.usersService.user({ id: req.user.id }); + if (!user) throw new BadRequestException("Invalid user"); + await this.authService.sendVerifyMail(user); } @ApiBody({ type: LoginDto }) diff --git a/front/components/Metronome.tsx b/front/components/Metronome.tsx index 9013cd9..320770a 100644 --- a/front/components/Metronome.tsx +++ b/front/components/Metronome.tsx @@ -1,4 +1,4 @@ -import { useEffect, useRef, useState } from 'react'; +import { useEffect, useRef } from 'react'; import { Slider, Switch, Text, View } from 'native-base'; export const Metronome = ({ paused = false, bpm }: { paused?: boolean; bpm: number }) => {