This commit is contained in:
Douglas Barone 2023-06-29 14:14:20 -04:00
parent b53804a706
commit 72ad91ff00
5 changed files with 3 additions and 3 deletions

View File

@ -1 +0,0 @@
BASE_URL=http://localhost:8000/api/

1
web/.env.development Normal file
View File

@ -0,0 +1 @@
VITE_BASE_URL=http://localhost:8000/api/

View File

@ -1 +0,0 @@
BASE_URL=https://printers.pp.ifms.edu.br/api/

1
web/.env.production Normal file
View File

@ -0,0 +1 @@
VITE_BASE_URL=https://printers.pp.ifms.edu.br/api/

View File

@ -1,4 +1,4 @@
const BASE_URL = process.env.BASE_URL || 'http://localhost:8000/api/' const BASE_URL = import.meta.env.VITE_BASE_URL || 'http://localhost:8000/api/'
export async function api<T>(endpoint: string, options: any): Promise<T> { export async function api<T>(endpoint: string, options: any): Promise<T> {
const token = localStorage.getItem('token') const token = localStorage.getItem('token')