mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-17 12:33:22 +00:00
fix optional chaining for files
This commit is contained in:
@@ -64,7 +64,7 @@ export class CardsController {
|
||||
@Body() body: UpdateCardDto
|
||||
): Promise<Card> {
|
||||
return this.commandBus.execute(
|
||||
new UpdateCardCommand(id, body, req.user.id, files.answerImg?.[0], files.questionImg?.[0])
|
||||
new UpdateCardCommand(id, body, req.user.id, files?.answerImg?.[0], files?.questionImg?.[0])
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user