Skip to content

Commit

Permalink
fix: ai response
Browse files Browse the repository at this point in the history
  • Loading branch information
2paperstar committed Jun 7, 2024
1 parent f322cca commit 39c3961
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/ai/ai.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@ export class AiService {
}

async getLookBookByUserUuid(userUuid: string) {
const results = await this.aiRepository.getLookBookByUserUuid(userUuid);
const { list, ...results } =
await this.aiRepository.getLookBookByUserUuid(userUuid);

return await Promise.all(
results.list.map(async ({ imageUuid, ...result }) => ({
...result,
imageUrl: await this.fileService.getSignedUrl(imageUuid),
})),
);
return {
...results,
list: await Promise.all(
list.map(async ({ imageUuid, ...result }) => ({
...result,
imageUrl: await this.fileService.getSignedUrl(imageUuid),
})),
),
};
}

async createLookBook(
Expand Down

0 comments on commit 39c3961

Please sign in to comment.