From f1b1e0458e4567ebae6770d5fe96fa7a76db3732 Mon Sep 17 00:00:00 2001 From: DOEKYONG Date: Thu, 17 Aug 2023 11:34:23 +0900 Subject: [PATCH] =?UTF-8?q?#102=20fix=20:=20=EB=A7=88=EC=9D=BC=EC=8A=A4?= =?UTF-8?q?=ED=86=A4=20null=20=EC=B2=98=EB=A6=AC=20=EC=88=98=EC=A0=95=20,?= =?UTF-8?q?=20=EC=9D=B4=EC=8A=88=20=EB=AA=A9=EB=A1=9D=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=20=EB=94=94=ED=8F=B4=ED=8A=B8=20=EA=B0=92=20?= =?UTF-8?q?open=20=EC=9C=BC=EB=A1=9C=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../issueTracker/issue/controller/IssueController.java | 2 +- .../codesquad/issueTracker/issue/service/IssueService.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/be/issue/src/main/java/codesquad/issueTracker/issue/controller/IssueController.java b/be/issue/src/main/java/codesquad/issueTracker/issue/controller/IssueController.java index 41188b18e..fa1818ead 100644 --- a/be/issue/src/main/java/codesquad/issueTracker/issue/controller/IssueController.java +++ b/be/issue/src/main/java/codesquad/issueTracker/issue/controller/IssueController.java @@ -22,7 +22,7 @@ public class IssueController { private final IssueService issueService; @GetMapping("/issues") - public ApiResponse getIssues(@RequestParam String status, + public ApiResponse getIssues(@RequestParam(defaultValue = "open") String status, @RequestParam(required = false) List labels, @RequestParam(required = false) Long milestone, @RequestParam(required = false) Long writer, diff --git a/be/issue/src/main/java/codesquad/issueTracker/issue/service/IssueService.java b/be/issue/src/main/java/codesquad/issueTracker/issue/service/IssueService.java index 6ea7eb362..3c152ec41 100644 --- a/be/issue/src/main/java/codesquad/issueTracker/issue/service/IssueService.java +++ b/be/issue/src/main/java/codesquad/issueTracker/issue/service/IssueService.java @@ -60,7 +60,9 @@ public IssueFilteredResponseDto findByFilter(IssueSearch issueSearch) { @Transactional public Long save(IssueWriteRequestDto request, Long id) { - milestoneService.isExistMilestone(request.getMilestoneId()); + if (request.getMilestoneId() != null) { + milestoneService.isExistMilestone(request.getMilestoneId()); + } List labels = request.getLabels(); List assignees = request.getAssignees(); Issue issue = IssueWriteRequestDto.toEntity(request, id);