Skip to content

Commit

Permalink
Merge pull request #140 from boostcampwm2023/hotfix/fix-diary-read-list
Browse files Browse the repository at this point in the history
[Hotfix] 일기 목록 오류 수정
  • Loading branch information
JoonSoo-Kim authored Nov 23, 2023
2 parents 5a1f14d + a11ec7a commit d1c3f8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions BE/src/diaries/diaries.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ export class DiariesRepository {
return this.getDiaryByUuid(uuid);
}

async readDiariesByUser(user): Promise<Diary[]> {
async readDiariesByUser(user: User): Promise<Diary[]> {
const diaryList = await Diary.find({
where: { user: user.id },
where: { user: { userId: user.userId } },
});

return diaryList;
}

Expand Down
2 changes: 1 addition & 1 deletion BE/src/diaries/diaries.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class DiariesService {
return diary;
}

async readDiariesByUser(user): Promise<Diary[]> {
async readDiariesByUser(user: User): Promise<Diary[]> {
let diaryList: Diary[] =
await this.diariesRepository.readDiariesByUser(user);

Expand Down

0 comments on commit d1c3f8a

Please sign in to comment.