From 8275089d299dec7636797abfd140f37999c93e4e Mon Sep 17 00:00:00 2001 From: ragdoll Date: Tue, 16 Jun 2020 02:30:18 +0900 Subject: [PATCH] =?UTF-8?q?[BE/#29]=20Feat=20:=20ApiResponse=EC=97=90=20?= =?UTF-8?q?=ED=91=9C=EC=A4=80=20=EC=97=90=EB=9F=AC=20=EA=B0=9D=EC=B2=B4=20?= =?UTF-8?q?=EB=B0=98=ED=99=98=20=EB=A9=94=EC=84=9C=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ApiResponse.UNAUTHORIZED() - 에러 메시지 상수화 --- .../issuetracker/ragdoll/commonconstant/ErrorMessages.java | 5 +++++ .../codesquad/issuetracker/ragdoll/response/ApiResponse.java | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 BE/src/main/java/com/codesquad/issuetracker/ragdoll/commonconstant/ErrorMessages.java diff --git a/BE/src/main/java/com/codesquad/issuetracker/ragdoll/commonconstant/ErrorMessages.java b/BE/src/main/java/com/codesquad/issuetracker/ragdoll/commonconstant/ErrorMessages.java new file mode 100644 index 0000000..8e2710d --- /dev/null +++ b/BE/src/main/java/com/codesquad/issuetracker/ragdoll/commonconstant/ErrorMessages.java @@ -0,0 +1,5 @@ +package com.codesquad.issuetracker.ragdoll.commonconstant; + +public class ErrorMessages { + public static String USER_UNAUTHORIZED = "권한이 없습니다. 올바른 인증 후 다시 시도 해주세요."; +} diff --git a/BE/src/main/java/com/codesquad/issuetracker/ragdoll/response/ApiResponse.java b/BE/src/main/java/com/codesquad/issuetracker/ragdoll/response/ApiResponse.java index 16e3c02..4172309 100644 --- a/BE/src/main/java/com/codesquad/issuetracker/ragdoll/response/ApiResponse.java +++ b/BE/src/main/java/com/codesquad/issuetracker/ragdoll/response/ApiResponse.java @@ -19,7 +19,9 @@ public static ApiResponse OK(T response) { return new ApiResponse(true, response); } - public static ApiResponse CREATED(T response) {return new ApiResponse(true, response); } + public static ApiResponse CREATED(T response) { return new ApiResponse(true, response); } + + public static ApiResponse UNAUTHORIZED(T response) { return new ApiResponse(false, response); } public boolean isStatus() { return status;