fix optional chaining for files

This commit is contained in:
andres
2023-07-23 12:45:38 +02:00
parent c593ccea05
commit 5fafb779a7
3 changed files with 8 additions and 5 deletions

View File

@@ -85,8 +85,9 @@ export class AuthController {
): Promise<UserEntity> {
const userId = req.user.id
return await this.commandBus.execute(new UpdateUserCommand(userId, body, files.avatar?.[0]))
return await this.commandBus.execute(new UpdateUserCommand(userId, body, files?.avatar?.[0]))
}
@ApiOperation({
description: 'Sign in using email and password. Must have an account to do so.',
summary: 'Sign in using email and password. Must have an account to do so.',