Skip to content

Commit

Permalink
hot fix : typeerror
Browse files Browse the repository at this point in the history
  • Loading branch information
overthestream committed May 13, 2024
1 parent 12e3116 commit 80d1eea
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/scrap/scrap.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ export class ScrapService {
): Promise<ScrapBoxResponseWithNotices> {
const scrapBox = await this.scrapBoxRepository.findOne({
where: { id: scrapBoxId },
relations: ['scraps', 'scraps.notice'],
relations: [
'scraps',
'scraps.notice',
'scraps.notice.category',
'scraps.notice.category.provider',
],
});
const scrapBoxes = await this.scrapBoxRepository.find({
where: { user: { id: userId } },
Expand Down Expand Up @@ -75,7 +80,12 @@ export class ScrapService {
): Promise<ScrapBoxResponseDto> {
const scrapBox = await this.scrapBoxRepository.findOne({
where: { id: scrapBoxId },
relations: ['scraps', 'scraps.notice'],
relations: [
'scraps',
'scraps.notice',
'scraps.notice.category',
'scraps.notice.category.provider',
],
});
if (!scrapBox)
throw new NotFoundException('해당 ScrapBox가 존재하지 않습니다');
Expand Down

0 comments on commit 80d1eea

Please sign in to comment.