Skip to content

Commit

Permalink
fix: RecommendedPostResponse dto 수정
Browse files Browse the repository at this point in the history
- id 필드 추가

#1397
  • Loading branch information
amaran-th committed Jul 30, 2023
1 parent b0fe580 commit 528818c
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
package wooteco.prolog.roadmap.application.dto;

import lombok.AllArgsConstructor;
import lombok.Getter;
import wooteco.prolog.roadmap.domain.RecommendedPost;

@AllArgsConstructor
@Getter
public class RecommendedPostResponse {

private final Long id;
private final String url;

public RecommendedPostResponse(final String url) {
this.url = url;
}

public static RecommendedPostResponse from(final RecommendedPost recommendedPost) {
return new RecommendedPostResponse(recommendedPost.getUrl());
return new RecommendedPostResponse(recommendedPost.getId(), recommendedPost.getUrl());
}
}

0 comments on commit 528818c

Please sign in to comment.