From 06382b3bf8c2856ce20a26deac359ac8464d7a1d Mon Sep 17 00:00:00 2001 From: yeseul106 <20191037@sungshin.ac.kr> Date: Mon, 4 Dec 2023 20:39:25 +0900 Subject: [PATCH] =?UTF-8?q?[#89]=20rename:=20=EA=B3=B5=ED=86=B5=20?= =?UTF-8?q?=EC=9D=91=EB=8B=B5=20=EB=AA=A8=EB=8D=B8=20=ED=81=B4=EB=9E=98?= =?UTF-8?q?=EC=8A=A4=EB=AA=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/common/response/ApiResponse.java | 28 ------------------- .../common/response/CommonResponseDto.java | 27 ++++++++++++++++++ 2 files changed, 27 insertions(+), 28 deletions(-) delete mode 100644 main/src/main/java/org/sopt/makers/crew/main/common/response/ApiResponse.java create mode 100644 main/src/main/java/org/sopt/makers/crew/main/common/response/CommonResponseDto.java diff --git a/main/src/main/java/org/sopt/makers/crew/main/common/response/ApiResponse.java b/main/src/main/java/org/sopt/makers/crew/main/common/response/ApiResponse.java deleted file mode 100644 index 0c8e6cfb..00000000 --- a/main/src/main/java/org/sopt/makers/crew/main/common/response/ApiResponse.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.sopt.makers.crew.main.common.response; - -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.Builder; -import lombok.Getter; -import org.springframework.http.HttpStatus; - -@Builder -@Getter -@JsonInclude(JsonInclude.Include.NON_NULL) -public class ApiResponse { - - private final String errorCode; - private T data; - - public static ApiResponse success(Object data) { - return ApiResponse.builder() - .data(data) - .build(); - } - - - public static ApiResponse fail(String errorCode) { - return ApiResponse.builder() - .errorCode(errorCode) - .build(); - } -} diff --git a/main/src/main/java/org/sopt/makers/crew/main/common/response/CommonResponseDto.java b/main/src/main/java/org/sopt/makers/crew/main/common/response/CommonResponseDto.java new file mode 100644 index 00000000..fe0fb31b --- /dev/null +++ b/main/src/main/java/org/sopt/makers/crew/main/common/response/CommonResponseDto.java @@ -0,0 +1,27 @@ +package org.sopt.makers.crew.main.common.response; + +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Builder; +import lombok.Getter; + +@Builder +@Getter +@JsonInclude(JsonInclude.Include.NON_NULL) +public class CommonResponseDto { + + private final String errorCode; + private T data; + + public static CommonResponseDto success(Object data) { + return CommonResponseDto.builder() + .data(data) + .build(); + } + + + public static CommonResponseDto fail(String errorCode) { + return CommonResponseDto.builder() + .errorCode(errorCode) + .build(); + } +}