11.6 save
This commit is contained in:
@@ -24,7 +24,7 @@ public class ArticleController {
|
||||
|
||||
@GetMapping()
|
||||
public List<ArticleResponse> getArticles(@AuthenticationPrincipal UserAuth userAuth, @ModelAttribute ArticleParam articleParam) {
|
||||
return articleService.getArticles(articleParam);
|
||||
return articleService.getArticles(userAuth, articleParam);
|
||||
}
|
||||
|
||||
@GetMapping("/{slug}")
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
|
||||
|
||||
public interface ArticleService {
|
||||
List<ArticleResponse> getArticles(ArticleParam articleParam);
|
||||
List<ArticleResponse> getArticles(UserAuth userAuth, ArticleParam articleParam);
|
||||
|
||||
ArticleResponse getArticle(UserAuth userAuth, String slug);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ArticleServiceImpl implements ArticleService {
|
||||
private final FavoriteRepository favoriteRepository;
|
||||
|
||||
@Override
|
||||
public List<ArticleResponse> getArticles(ArticleParam articleParam){
|
||||
public List<ArticleResponse> getArticles(UserAuth userAuth, ArticleParam articleParam){
|
||||
Pageable pageable = null;
|
||||
List<Article> articles = null;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.io.realworld.domain.aggregate.user.service.UserServiceImpl;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Value;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -70,6 +70,7 @@ class CommentRepositoryTest {
|
||||
articleRepository.save(article);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
@DisplayName("댓글 추가 테스트")
|
||||
void addComment(){
|
||||
|
||||
Reference in New Issue
Block a user