diff --git a/app/src/main/java/fc/be/app/domain/review/controller/ReviewController.java b/app/src/main/java/fc/be/app/domain/review/controller/ReviewController.java index 964abee8..fb7bea32 100644 --- a/app/src/main/java/fc/be/app/domain/review/controller/ReviewController.java +++ b/app/src/main/java/fc/be/app/domain/review/controller/ReviewController.java @@ -22,7 +22,7 @@ public ApiResponse createReview(@Valid @RequestBody Review } @PatchMapping - public ApiResponse editReview(@Valid @RequestBody ReviewEditRequest reviewEditRequest) { + public ApiResponse editReview(@Valid @RequestBody ReviewEditRequest reviewEditRequest) { return ApiResponse.ok(reviewService.editReview(reviewEditRequest)); } diff --git a/app/src/main/java/fc/be/app/global/http/ApiResponse.java b/app/src/main/java/fc/be/app/global/http/ApiResponse.java index c213111c..95fa6e48 100644 --- a/app/src/main/java/fc/be/app/global/http/ApiResponse.java +++ b/app/src/main/java/fc/be/app/global/http/ApiResponse.java @@ -11,19 +11,19 @@ public record ApiResponse( private static final HttpStatus CREATED = HttpStatus.CREATED; private static final String DEFAULT_MESSAGE = "SUCCESS"; - public static ApiResponse ok() { - return new ApiResponse(OK.value(), DEFAULT_MESSAGE, null); + public static ApiResponse ok() { + return new ApiResponse<>(OK.value(), DEFAULT_MESSAGE, null); } - public static ApiResponse ok(T data) { - return new ApiResponse(OK.value(), DEFAULT_MESSAGE, data); + public static ApiResponse ok(T data) { + return new ApiResponse<>(OK.value(), DEFAULT_MESSAGE, data); } - public static ApiResponse created() { - return new ApiResponse(CREATED.value(), DEFAULT_MESSAGE, null); + public static ApiResponse created() { + return new ApiResponse<>(CREATED.value(), DEFAULT_MESSAGE, null); } - public static ApiResponse created(T data) { - return new ApiResponse(CREATED.value(), DEFAULT_MESSAGE, data); + public static ApiResponse created(T data) { + return new ApiResponse<>(CREATED.value(), DEFAULT_MESSAGE, data); } }