Skip to content

Commit

Permalink
fix: 로그인 성공 조건 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
mlnwns committed Jul 22, 2024
1 parent 3fa0eb4 commit 9a5a3ff
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions FE/error/src/pages/LoginPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,18 @@ const LoginPage = () => {
);
console.log("response", response);
console.log("response.data", response.data);
if (response.data.data.code === "201") {

if (response.data.code === "201") {
localStorage.setItem("slackToken", response.data.data.accessToken);
navigate("/");
} else {
setError(response.data.data.message || "Login failed");
console.log(response.data.data.code);
console.error("Login failed:", response.data.data);
setError(response.data.message || "로그인 실패");
console.log(response.data.code);
console.error("로그인 실패:", response.data);
}
} catch (error) {
setError("Authentication failed. Please try again.");
console.error(
"Error during Slack authentication:",
error.response || error
);
setError("인증에 실패했습니다. 다시 시도해주세요.");
console.error("Slack 인증 중 오류 발생:", error.response || error);
} finally {
setIsLoading(false);
}
Expand Down

0 comments on commit 9a5a3ff

Please sign in to comment.