add v2 login page

This commit is contained in:
Alex Holliday committed 2025-09-25 16:06:52 -07:00
1 parent 659162d60c
commit cb1e10f0a9
14 files changed
+445 -5

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import axios from "axios";
import type { AxiosRequestConfig, AxiosResponse } from "axios";
const BASE_URL = import.meta.env.VITE_APP_API_V2_BASE_URL;
const api = axios.create({
baseURL: BASE_URL || "http://localhost:55555/api/v2",
withCredentials: true,
});
export const get = <T>(
url: string,
config: AxiosRequestConfig = {}
): Promise<AxiosResponse<T>> => api.get<T>(url, config);
export const post = <T>(
url: string,
data: any,
config: AxiosRequestConfig = {}
): Promise<AxiosResponse<T>> => api.post<T>(url, data, config);
export default api;