Skip to content

Commit

Permalink
[KAN-191] fix(-): resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
rlatkd committed Jul 13, 2024
2 parents a0529f6 + f3c2a9b commit 70a32a7
Show file tree
Hide file tree
Showing 46 changed files with 550 additions and 129 deletions.
229 changes: 226 additions & 3 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"axios": "^1.7.2",
"qrcode.react": "^3.1.0",
"react": "^18.3.1",
"react-cookie": "^7.1.4",
"react-daum-postcode": "^3.1.3",
"react-dom": "^18.3.1",
"react-icons": "^5.2.1",
Expand Down
31 changes: 28 additions & 3 deletions client/src/apis/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { publicAxios } from '.';
// 회원가입
export const postJoin = async info => {
try {
return await publicAxios.post('/v1/vendor/auth/join', info);
const res = await publicAxios.post('/v1/vendor/auth/join', info);
return res;
} catch (err) {
console.error('회원가입 실패 =>', err.response.data);
throw err;
Expand All @@ -13,21 +14,45 @@ export const postJoin = async info => {
// 로그인
export const postLogin = async info => {
try {
return await publicAxios.post('/v1/vendor/auth/login', info);
const res = await publicAxios.post('/v1/vendor/auth/login', info);
return res;
} catch (err) {
console.error('로그인 실패 =>', err.response.data);
throw err;
}
};

// 로그아웃
export const deleteLogout = async () => {
try {
const res = await publicAxios.delete('/v1/vendor/auth/logout');
return res;
} catch (err) {
console.log('로그아웃 실패', err.response.data);
throw err;
}
};

// 아이디 중복확인
export const getCheckUsername = async username => {
try {
return await publicAxios.get('/v1/vendor/auth/check-username', {
const res = await publicAxios.get('/v1/vendor/auth/check-username', {
params: { username: username },
});
return res;
} catch (err) {
console.error('아이디 중복확인 =>', err.response.data);
throw err;
}
};

// 리프레쉬 토큰 재발급
export const postRefreshToken = async () => {
try {
const res = await publicAxios.post('/v1/vendor/auth/refresh');
return res;
} catch (err) {
console.log('리프레쉬 토큰 재발급 실패', err.response.data);
throw err;
}
};
Loading

0 comments on commit 70a32a7

Please sign in to comment.