From a1d307764aeb12b659bec7356b3bbbf004f854d3 Mon Sep 17 00:00:00 2001 From: Lemonade255 Date: Wed, 25 Oct 2023 14:56:44 +0900 Subject: [PATCH] =?UTF-8?q?feat(BE):=20=EB=A7=A4=EC=B9=AD=20=EC=8B=A0?= =?UTF-8?q?=EC=B2=AD=20=EC=83=81=ED=83=9C=20=EB=B0=98=ED=99=98=20BUS-202-M?= =?UTF-8?q?VP1-API-test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/matching/adapter/in/rest/MatchingController.java | 2 +- .../api/matching/service/MatchingApplicationService.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/api/matching/adapter/in/rest/MatchingController.java b/src/main/java/com/example/api/matching/adapter/in/rest/MatchingController.java index c3692ba..299b3a8 100644 --- a/src/main/java/com/example/api/matching/adapter/in/rest/MatchingController.java +++ b/src/main/java/com/example/api/matching/adapter/in/rest/MatchingController.java @@ -150,7 +150,7 @@ public void processMatchingApplication(SaveMatchingApplicationDto matchingApplic .userId(matchingApplicationDto.getUserId()) .matchingId(matchingApplicationDto.getMatchingId()) .build(); - + // Invalid input 거르기 if (matchingApplicationDto.getState() == ApplicationStateEnum.Approved) { matchingApplicationUsecase.approveMatchingApplication(matchingApplicationDto); diff --git a/src/main/java/com/example/api/matching/service/MatchingApplicationService.java b/src/main/java/com/example/api/matching/service/MatchingApplicationService.java index a26ea6a..7b14856 100644 --- a/src/main/java/com/example/api/matching/service/MatchingApplicationService.java +++ b/src/main/java/com/example/api/matching/service/MatchingApplicationService.java @@ -142,7 +142,8 @@ public String getUserStatus(Long matchingId) { MatchingApplicationPK matchingApplicationPK = new MatchingApplicationPK(securityUser.getUserId(), matchingId); Optional statusData = matchingApplicationPort.getByMatchingApplicationPK(matchingApplicationPK); if (statusData.isPresent()) { - return statusData.get().getState().toString(); + String status = statusData.get().getState().toString(); + return status.substring(status.indexOf('.') + 1, status.indexOf('(')); } else { return "None"; }