-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1주차] 기본 과제 & 심화 과제 #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
헉 아직 잘 모르는 제가 보기에도 너무 깔끔한 코드인 것 같아요!
아직 깔끔한 코드에 대해 잘 몰라서 gpt에다가도 개선점이 있을까 한 번 물어봤는데도 그렇다 할 개선점이 제가 보기에는 없는 것 같아요 너무 고생하셨습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제가 보기에도 깔끔한 코드인 게 보이네요!! 저도 본받아 열심히 하겠습니다 고생하셨습니다.!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다~
@Builder(access = PRIVATE) | ||
@Getter | ||
public class ApiResponse<T> { | ||
private final int code; | ||
private final String status; | ||
private final boolean success; | ||
@JsonInclude(NON_NULL) | ||
private final T data; | ||
|
||
public static <T> ApiResponse<?> of(final HttpStatus httpStatus, final boolean isSuccess) { | ||
return ApiResponse.builder() | ||
.code(httpStatus.value()) | ||
.status(httpStatus.name()) | ||
.success(isSuccess) | ||
.build(); | ||
} | ||
|
||
public static <T> ApiResponse<?> of(final HttpStatus httpStatus, final boolean isSuccess, final T data) { | ||
return ApiResponse.builder() | ||
.code(httpStatus.value()) | ||
.status(httpStatus.name()) | ||
.success(isSuccess) | ||
.data(data) | ||
.build(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
깔끔하네요~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코드 너무 깔끔하고 보기 좋은 거 같아요!
저도 많이 배워갑니다,,, 고생하셨어요!
Related Issue ☃️
close #1
Description ✔️