Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
fix : 이미지 불러오기 오류 수정 (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
yewonahn authored Feb 11, 2024
2 parents 9085063 + d3427ed commit 42a7e45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 0 additions & 3 deletions src/follow/follow.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export class FollowService {

// 사용자 프로필 이미지
const image = await this.userService.getProfileImage(mateEntity.id);
followDto.image = image.imageKey;
if(image == null) followDto.image = null;
else{
const userImageKey = image.imageKey;
Expand Down Expand Up @@ -144,7 +143,6 @@ export class FollowService {

// 사용자 프로필 이미지
const image = await this.userService.getProfileImage(mateEntity.id);
followDto.image = image.imageKey;
if(image == null) followDto.image = null;
else{
const userImageKey = image.imageKey;
Expand Down Expand Up @@ -184,7 +182,6 @@ export class FollowService {

// 사용자 프로필 이미지
const image = user.profileImage;
followSearchDto.image = image.imageKey;
if(image == null) followSearchDto.image = null;
else{
const userImageKey = image.imageKey;
Expand Down
8 changes: 3 additions & 5 deletions src/rule/rule.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class RuleService {
rulePair.ruleDetail = sub.ruleDetail;

return rulePair;
}))
}));

// -3) 멤버 정보
dto.detailMembers = await Promise.all(invitations.map(async(invitation):Promise<DetailMemberDto> => {
Expand All @@ -94,7 +94,6 @@ export class RuleService {

// 사용자 프로필 이미지
const image = memberEntity.profileImage;
detailMember.image = image.imageKey;
if(image == null) detailMember.image = null;
else{
const userImageKey = image.imageKey;
Expand All @@ -103,7 +102,7 @@ export class RuleService {
return detailMember;
}))
return dto;
}
};

// [3] 여행 규칙 나가기
// -1) 초대 받은 팀원 -> 초대 삭제
Expand All @@ -118,7 +117,7 @@ export class RuleService {
const invitationsList : RuleInvitationEntity[] = await RuleInvitationEntity.find({
where : {rule : {id: ruleId}},
relations : {member : true}
})
});

const membersList : GetMemberListDto[] = await Promise.all(invitationsList.map(async (invitation) : Promise<GetMemberListDto> => {
const memberEntity : UserEntity = invitation.member;
Expand All @@ -132,7 +131,6 @@ export class RuleService {

// 사용자 프로필 이미지
const image = await this.userService.getProfileImage(memberEntity.id);
memberDto.image = image.imageKey;
if(image == null) memberDto.image = null;
else {
const userImageKey = image.imageKey;
Expand Down

0 comments on commit 42a7e45

Please sign in to comment.