Skip to content

Commit 71bfd66

Browse files
μž₯μ•„μ˜μž₯μ•„μ˜
authored andcommitted
[#120] πŸ—‘οΈ remove unused fetch function
1 parent ebb5d2d commit 71bfd66

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

β€Žsrc/services/auth/auth.tsβ€Ž

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
11
import { SignInRequest, SignInResponse, SignUpRequest} from '@/types/auth.types'
2-
import axios, { AxiosResponse } from 'axios'
32

4-
const BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL
5-
6-
if (!BASE_URL) {
7-
throw new Error("ν™˜κ²½ λ³€μˆ˜ 'NEXT_PUBLIC_API_BASE_URL'이 μ •μ˜λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€.")
8-
}
9-
10-
// Axios μΈμŠ€ν„΄μŠ€ 생성
11-
const apiClient = axios.create({
12-
baseURL: BASE_URL,
13-
// withCredentials: true,
14-
})
15-
16-
export const signIn = async (
17-
data: SignInRequest
18-
): Promise<AxiosResponse<SignInResponse>> => {
19-
return await apiClient.post<SignInResponse>('/v1/auth/sign-in', data, {
20-
// withCredentials: true, //
21-
})
22-
}
23-
24-
export const signOut = async () => {
25-
return await axios.post('/v1/auth/logout', {}, { withCredentials: true })
26-
}
27-
283
const BACKEND_BASE_URL = process.env.NEXT_PUBLIC_BACKEND_BASE_URL
294
export const SignUp = async (data: SignUpRequest): Promise<Response> => {
305
return await fetch(`${BACKEND_BASE_URL}/v1/auth/sign-up`, {

0 commit comments

Comments
Β (0)