Skip to content

Commit

Permalink
[#32] PR 내용 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
thejsw committed Sep 8, 2022
1 parent 5dd9208 commit 91ea55f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion front/src/components/Signin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const Signin = () => {
</fieldset>

<button
type="button"
type="submit"
className="btn btn-lg btn-primary pull-xs-right"
>
Sign In
Expand Down
21 changes: 4 additions & 17 deletions front/src/remotes/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,12 @@ const conduitAxios = axios.create({

// ㅡㅡㅡㅡㅡ User ㅡㅡㅡㅡㅡ
/**
* @param {{ email: string; password: string;}} user
* @param {{email: string; password: string;}} user
* @returns {Promise<{ data: { user: User }}>}
*/
const postUsersLogin = (user) => conduitAxios.post(`/users/login`);
postUsersLogin()
.then((res) => {
console.log(res);
console.log(`res.data.email :: ${res.data.user.email}`);
if (res.data.user.email === undefined) {
console.log(`입력하신 id가 일치하지 않습니다`);
} else if (res.data.user.email === null) {
console.log(`입력하신 비밀번호가 일치하지 않습니다`);
} else if (res.data.user.email === props.email) {
console.log(`로그인 성공`);
}
document.location.href = '/';
})
.catch((e) => {
console.log(e);
const postUsersLogin = (user) =>
conduitAxios.post(`/users/login`, {
data: { email: user.email, password: user.password },
});

/**
Expand Down

0 comments on commit 91ea55f

Please sign in to comment.