mirror of
https://github.com/ershisan99/cards-front.git
synced 2026-02-02 05:02:06 +00:00
add auth api and auth instance
This commit is contained in:
7
src/features/auth/auth.api.ts
Normal file
7
src/features/auth/auth.api.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { AuthInstance } from "@/features/auth/auth.instance"
|
||||
|
||||
export const AuthApi = () => ({
|
||||
register: (params: any) => {
|
||||
return AuthInstance.post(params)
|
||||
},
|
||||
})
|
||||
6
src/features/auth/auth.instance.ts
Normal file
6
src/features/auth/auth.instance.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import axios from "axios"
|
||||
|
||||
export const AuthInstance = axios.create({
|
||||
baseURL: import.meta.env.BASE_URL + "auth/",
|
||||
withCredentials: true,
|
||||
})
|
||||
Reference in New Issue
Block a user