Fixed bug in return creation
This commit is contained in:
parent
8c00aefd6c
commit
6c9b91d75a
|
@ -61,9 +61,10 @@ export class RunnerCardController {
|
|||
|
||||
if (returnCards) {
|
||||
let responseCards: ResponseRunnerCard[] = new Array<ResponseRunnerCard>();
|
||||
cards.forEach(card => {
|
||||
responseCards.push(new ResponseRunnerCard(card));
|
||||
});
|
||||
for await (let card of cards) {
|
||||
let dbCard = await this.cardRepository.findOne({ id: card.id });
|
||||
responseCards.push(new ResponseRunnerCard(dbCard));
|
||||
}
|
||||
return responseCards;
|
||||
}
|
||||
let response = new ResponseEmpty();
|
||||
|
|
Loading…
Reference in New Issue