Skip to content

Commit

Permalink
fix: postMapper 수정 #78
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangyoo committed Jan 27, 2023
1 parent 36a5533 commit d586609
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ default List<PostResponseDto.Home> postListToPostHomeResponseDtoList(List<Post>
.memberId(post.getMember().getMemberId())
.username(post.getMember().getUsername())
.memberPicture(post.getMember().getPicture())
.pictureUrl(post.getPostImages().get(0).getPostImageUrl())
.pictureUrl(post.getPostImages().isEmpty() ? "" : post.getPostImages().get(0).getPostImageUrl())
.views(post.getViews())
.likes(post.getLikes())
.postTitle(post.getPostTitle())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.main36.pikcha.domain.post.service;


import com.main36.pikcha.domain.image.service.PostImageService;
import com.main36.pikcha.domain.member.entity.Member;


Expand Down Expand Up @@ -29,6 +30,7 @@ public class PostService {

private final PostRepository postRepository;
private final PostLikesRepository postLikesRepository;
private final PostImageService postImageService;

public Post createPost(Post post) {
Long numOfPostsPlusOne = post.getAttraction().getNumOfPosts() + 1;
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
spring:
profiles:
active: test
active: local

0 comments on commit d586609

Please sign in to comment.