-
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 #5 from cau-likelion-org/develop
[3차 배포] API 일부 연결 테스트
- Loading branch information
Showing
27 changed files
with
652 additions
and
379 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import axios from "axios"; | ||
|
||
export const getInterviewApi = async (name: string) => { | ||
return await axios | ||
.get(`${process.env.NEXT_PUBLIC_SERVER_URL}/api/interviews?part=${name}`) | ||
.then((response) => { | ||
return response; | ||
}) | ||
.catch((error) => { | ||
if (axios.isAxiosError(error)) { | ||
const result = error.response?.data?.detail; | ||
return result; | ||
} | ||
}); | ||
}; |
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,6 @@ | ||
import axios from "axios"; | ||
|
||
// export const getUserTokenApi = () => { | ||
// return await axios | ||
// .get() | ||
// } |
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,16 @@ | ||
import axios from "axios"; | ||
|
||
export const getMypageApi = async (token: string) => { | ||
axios.defaults.headers.common["Authorization"] = `Bearer ${token}`; | ||
return await axios | ||
.get(`${process.env.NEXT_PUBLIC_SERVER_URL}/api/users/me`) | ||
.then((response) => { | ||
return response; | ||
}) | ||
.catch((error) => { | ||
if (axios.isAxiosError(error)) { | ||
const result = error.response?.data?.detail; | ||
return result; | ||
} | ||
}); | ||
}; |
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,27 @@ | ||
import { TotalInterviewInfo } from "@/store/type"; | ||
import Link from "next/link"; | ||
import React from "react"; | ||
import InterviewCard from "./InterviewCard"; | ||
|
||
const CallInterviewCard = (props: TotalInterviewInfo) => { | ||
return ( | ||
<Link | ||
key={props.interviewId} | ||
href={{ | ||
pathname: "/interview/[detail]", | ||
query: { detail: props.interviewId }, | ||
}} | ||
> | ||
<InterviewCard | ||
interviewId={props.interviewId} | ||
generation={props.generation} | ||
OneLineContent={props.OneLineContent} | ||
imageUrl={props.imageUrl} | ||
name={props.name} | ||
part={props.part} | ||
/> | ||
</Link> | ||
); | ||
}; | ||
|
||
export default CallInterviewCard; |
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
Oops, something went wrong.