Skip to content

Commit

Permalink
feat: CommentResponse role,username 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
KEEKE132 committed May 26, 2024
1 parent 77cdc9d commit b43699f
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@ public class CommentResponse {

private Long authorid;

public CommentResponse(Comment comment){
this.id= comment.getId();
this.message=comment.getMessage();
if(comment.getAuthor()!=null){
this.authorid= comment.getAuthor().getId();
private String username;

private String role;
public CommentResponse(Comment comment) {
this.id = comment.getId();
this.message = comment.getMessage();
if (comment.getAuthor() != null) {
this.authorid = comment.getAuthor().getId();
this.username = comment.getAuthor().getUsername();
this.role = comment.getAuthor().getRole();
}
this.created_at=comment.getCreated_at();
this.created_at = comment.getCreated_at();
}
}

0 comments on commit b43699f

Please sign in to comment.