Fix eslint and bad reverify mail issue

This commit is contained in:
2023-09-19 19:30:55 +02:00
committed by Clément Le Bihan
parent 31b965e8f6
commit ee8e0e26db
2 changed files with 4 additions and 2 deletions

View File

@@ -97,7 +97,9 @@ export class AuthController {
@UseGuards(JwtAuthGuard) @UseGuards(JwtAuthGuard)
@Put('reverify') @Put('reverify')
async reverify(@Request() req: any): Promise<void> { async reverify(@Request() req: any): Promise<void> {
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 }) @ApiBody({ type: LoginDto })

View File

@@ -1,4 +1,4 @@
import { useEffect, useRef, useState } from 'react'; import { useEffect, useRef } from 'react';
import { Slider, Switch, Text, View } from 'native-base'; import { Slider, Switch, Text, View } from 'native-base';
export const Metronome = ({ paused = false, bpm }: { paused?: boolean; bpm: number }) => { export const Metronome = ({ paused = false, bpm }: { paused?: boolean; bpm: number }) => {