Skip to content

Commit

Permalink
[BE/#29] Feat : ApiResponse에 표준 에러 객체 반환 메서드 추가
Browse files Browse the repository at this point in the history
- ApiResponse.UNAUTHORIZED()
- 에러 메시지 상수화
  • Loading branch information
MuseopKim committed Jun 15, 2020
1 parent ba0ba21 commit 8275089
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.codesquad.issuetracker.ragdoll.commonconstant;

public class ErrorMessages {
public static String USER_UNAUTHORIZED = "권한이 없습니다. 올바른 인증 후 다시 시도 해주세요.";
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ public static <T> ApiResponse<T> OK(T response) {
return new ApiResponse(true, response);
}

public static <T> ApiResponse<T> CREATED(T response) {return new ApiResponse(true, response); }
public static <T> ApiResponse<T> CREATED(T response) { return new ApiResponse(true, response); }

public static <T> ApiResponse<T> UNAUTHORIZED(T response) { return new ApiResponse(false, response); }

public boolean isStatus() {
return status;
Expand Down

0 comments on commit 8275089

Please sign in to comment.