Skip to content

Commit

Permalink
๐Ÿ”จ Refactor(#113): baseInstance ์ ์šฉ
Browse files Browse the repository at this point in the history
  • Loading branch information
JIY00N2 committed Nov 6, 2023
1 parent b8f98e5 commit 2ae65e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/services/oauth/kakao/getKakaoLoginURL.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import axios from "axios";
import { baseInstance } from "@/services";

const getKakaoLoginUrl = async () => {
try {
const response = await axios.get(
"https://dev.steadies.kr/api/v1/auth/kakao",
);
const response = await baseInstance.get("api/v1/auth/kakao");
if (response.status !== 200) {
throw new Error("Failed to fetch kakao url!");
}
Expand Down
6 changes: 3 additions & 3 deletions src/services/oauth/kakao/getKakaoToken.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import axios from "axios";
import { baseInstance } from "@/services";

const getKakaoToken = async (code: string) => {
try {
const response = await axios.get(
`https://dev.steadies.kr/api/v1/auth/kakao/callback?code=${code}`,
const response = await baseInstance.get(
`/api/v1/auth/kakao/callback?code=${code}`,
);
if (response.status !== 200) {
throw new Error("Failed to fetch kakao token!");
Expand Down

0 comments on commit 2ae65e5

Please sign in to comment.