-
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.
- Loading branch information
1 parent
c611536
commit 882f365
Showing
15 changed files
with
724 additions
and
101 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,21 @@ | ||
|
||
import { instance } from "./axiosModule"; | ||
|
||
export const getRanking = async(quizGameId) => { | ||
const url = `/quizzes/ranking/${quizGameId}`; | ||
const tokens = JSON.parse(localStorage.getItem('tokens')) | ||
console.log(tokens.accessToken); | ||
const headers = { | ||
"Authorization": `Bearer ${tokens.accessToken}` | ||
} | ||
|
||
return await instance.get(url, {headers}) | ||
.then((res) => { | ||
console.log('api 결과:', res) | ||
return res.data; | ||
}) | ||
.catch( | ||
(err) => {console.log("API 호출 에러", err) | ||
throw err;} | ||
) | ||
} |
Oops, something went wrong.