Skip to content

Commit

Permalink
feat: #111 토큰 발급 API 함수 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
kimsuyeon0916 committed Jul 3, 2024
1 parent cc1d8b4 commit c99efd1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/service/auth/auth.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Department, #Payload, University, UserReponse } from '../../types';
import { EndPoint, axiosAuthInstance, axiosInstance } from '..';
import axios from 'axios';

const platformType = 'NAVER';

Expand Down Expand Up @@ -116,3 +117,14 @@ export const withdrawAccount = async () => {
console.error(error);
}
};

export const issueToken = async () => {
try {
const response = await axios.post<UserReponse>(EndPoint.ISSUE);

return response;
} catch (error) {
console.error(error);
return null;
}
};
2 changes: 2 additions & 0 deletions src/service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
readDepartmentList,
signOut,
withdrawAccount,
issueToken,
} from './auth/auth';
import {
getPostingData,
Expand Down Expand Up @@ -80,4 +81,5 @@ export {
deletePostingRecruit,
readProfileImage,
withdrawAccount,
issueToken,
};

0 comments on commit c99efd1

Please # to comment.