mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-28 20:59:27 +00:00
fix learn endpoint
This commit is contained in:
@@ -159,7 +159,9 @@ export class AuthController {
|
||||
@Res({ passthrough: true }) res: ExpressResponse
|
||||
): Promise<void> {
|
||||
if (!accessToken) throw new UnauthorizedException()
|
||||
|
||||
await this.commandBus.execute(new LogoutCommand(accessToken))
|
||||
|
||||
res.clearCookie('accessToken', { httpOnly: true, sameSite: 'none', secure: true })
|
||||
|
||||
res.clearCookie('refreshToken', {
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
import { IsNumber, IsString, Max, Min } from 'class-validator'
|
||||
|
||||
export class SaveGradeDto {
|
||||
@IsString()
|
||||
cardId: string
|
||||
|
||||
@IsNumber()
|
||||
@Max(5)
|
||||
@Min(1)
|
||||
grade: number
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user