Skip to content

Commit

Permalink
Merge pull request #95 from DevKor-github/feature/community
Browse files Browse the repository at this point in the history
feature/community
  • Loading branch information
KimSeongHyeonn authored Sep 9, 2024
2 parents 8faa04a + 92c40e2 commit 9927475
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/community/comment/dto/get-comment.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,19 @@ export class GetCommentResponseDto {
this.id = commentEntity.id;
this.isDeleted = commentEntity.deletedAt ? true : false;
this.createdAt = commentEntity.createdAt;
if (!this.isDeleted) {
this.updatedAt = commentEntity.updatedAt;
this.updatedAt = commentEntity.updatedAt;
if (this.isDeleted) {
this.isMyComment = false;
this.content = null;
this.user = {
username: null,
isAnonymous: false,
isDeleted: false,
character: { type: null, level: null },
};
this.likeCount = null;
this.myLike = false;
} else {
this.isMyComment = commentEntity.userId === userId;
this.content = commentEntity.content;
this.user = new CommunityUser(
Expand Down

0 comments on commit 9927475

Please sign in to comment.