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(); + } +}