This repository has been archived by the owner on Dec 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Team-INSERT/refactor/change-dto
refactor : 백엔드 변경사항에 맞게 DTO 변경
- Loading branch information
Showing
10 changed files
with
35 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
import { http } from "@/apis"; | ||
import { refreshToken } from "@/apis/header"; | ||
import { TOKEN } from "@/constants"; | ||
import { Storage } from "@/storage"; | ||
|
||
export const requestLogin = async (authCode: string) => { | ||
const { data } = await http.post("/auth/oauth/bsm", null, { headers: { authCode } }); | ||
export const refresh = async () => { | ||
const { data } = await http.put("/auth/refresh/access", null, refreshToken()); | ||
Storage.setItem(TOKEN.ACCESS, data.accessToken); | ||
return data.accessToken; | ||
}; | ||
|
||
export const requestLogin = async (accessToken: string) => { | ||
const { data } = await http.post("/auth/oauth/bsm", { accessToken }); | ||
return data; | ||
}; | ||
|
||
export const requestLogout = async () => { | ||
const { data } = await http.delete("/auth/bsm/logout", { | ||
headers: { RefreshToken: Storage.getItem(TOKEN.REFRESH) }, | ||
}); | ||
const { data } = await http.delete("/auth/bsm/logout", refreshToken()); | ||
return data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { HistoryType } from "."; | ||
|
||
export default interface HistoryListType { | ||
versionDocsResponseDto: Array<HistoryType>; | ||
docsType: string; | ||
title: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters