From 1d650bb3fdfc3a58982fa9416cdedadc0c6273cc Mon Sep 17 00:00:00 2001 From: hyobinkim Date: Tue, 10 Jan 2023 14:12:32 +0900 Subject: [PATCH] =?UTF-8?q?Feat=20:=20#33=20=EC=93=B8=EB=8D=B0=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=EC=A3=BC=EC=84=9D=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- godchigam/build.gradle | 4 +--- .../domain/userReport/controller/UserReportController.java | 3 --- .../domain/userReport/service/UserReportService.java | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/godchigam/build.gradle b/godchigam/build.gradle index 2f5f3d1..6318df3 100644 --- a/godchigam/build.gradle +++ b/godchigam/build.gradle @@ -28,15 +28,13 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' - //implementation 'io.jsonwebtoken:jjwt:0.9.1' // JWT implementation 'io.jsonwebtoken:jjwt-api:0.11.2' implementation 'javax.xml.bind:jaxb-api' //JWT - // S3 + implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE' runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.2', 'io.jsonwebtoken:jjwt-jackson:0.11.2' - } tasks.named('test') { diff --git a/godchigam/src/main/java/com/godchigam/godchigam/domain/userReport/controller/UserReportController.java b/godchigam/src/main/java/com/godchigam/godchigam/domain/userReport/controller/UserReportController.java index 3c6d173..ef19b9f 100644 --- a/godchigam/src/main/java/com/godchigam/godchigam/domain/userReport/controller/UserReportController.java +++ b/godchigam/src/main/java/com/godchigam/godchigam/domain/userReport/controller/UserReportController.java @@ -21,15 +21,12 @@ public class UserReportController { private final UserReportService userReportService; private final JwtTokenProvider jwtTokenProvider; - // @PostMapping("/report") public CommonResponse createReport(@RequestHeader("token") String accessToken, @RequestBody UserReportCreationRequest request){ String userId = jwtTokenProvider.getUserLoginId(accessToken); UserReport report = userReportService.createReport(userId,request); if(report == null){ - //에러발생 throw new BaseException(ErrorCode.USERS_EMPTY_USER_ID); - } return CommonResponse.success(null,"유저 신고 성공"); diff --git a/godchigam/src/main/java/com/godchigam/godchigam/domain/userReport/service/UserReportService.java b/godchigam/src/main/java/com/godchigam/godchigam/domain/userReport/service/UserReportService.java index b94139f..d880c40 100644 --- a/godchigam/src/main/java/com/godchigam/godchigam/domain/userReport/service/UserReportService.java +++ b/godchigam/src/main/java/com/godchigam/godchigam/domain/userReport/service/UserReportService.java @@ -21,7 +21,7 @@ public class UserReportService { private final UserReportRepository userReportRepository; private final UserRepository userRepository; - //유저 신고 + public UserReport createReport(String userId, UserReportCreationRequest request){ Optional user = userRepository.findById(request.getReportId()); //신고할 유저 Optional user1 = userRepository.findByLoginId(userId); //신고한 유저