This file contains hidden or 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
| import axios from "axios"; | |
| const BASE_URL = process.env.API_URL; | |
| const app = axios.create({ | |
| baseURL: BASE_URL, | |
| withCredentials: true, | |
| }); | |
| app.interceptors.request.use( |
This file contains hidden or 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
| //types | |
| import type { Ref } from "vue"; | |
| import type { z, ZodTypeAny } from "zod"; | |
| export type ZodFormType<T extends ZodTypeAny> = z.infer<T>; | |
| export interface ValidateFormType<T extends ZodTypeAny> { | |
| values: ZodFormType<T>; | |
| schema: T; | |
| errors: Ref<Record<string, string>>; |