Fix backend url conf

This commit is contained in:
T'JAMPENS QUENTIN p2406187
2026-01-12 21:50:03 +01:00
parent 6723d42a5f
commit 1c10240b8d
19 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
export default async function getAllUser() {
try {
const res = await fetch(`http://${import.meta.env.VITE_API_URL}/api/users`, {
const res = await fetch(`${import.meta.env.VITE_API_URL}/api/users`, {
method: 'GET',
credentials: 'include',
headers: {
+1 -1
View File
@@ -1,6 +1,6 @@
export default async function getUserById(id) {
try {
const res = await fetch(`http://${import.meta.env.VITE_API_URL}/api/users/${id}`, {
const res = await fetch(`${import.meta.env.VITE_API_URL}/api/users/${id}`, {
method: 'GET',
credentials: 'include',
headers: {
+1 -1
View File
@@ -2,7 +2,7 @@ export default async function searchUsers(query) {
try {
const encodedQuery = encodeURIComponent(query);
const response = await fetch(
`http://localhost:80/api/users/search?query=${encodedQuery}`,
`${import.meta.env.VITE_API_URL}/api/users/search?query=${encodedQuery}`,
{
method: 'GET',
credentials: 'include',
+1 -1
View File
@@ -5,7 +5,7 @@ export default async function updateUser(name, lastname, phone) {
const csrfToken = await getXSRFToken();
try {
const res = await fetch(`http://${import.meta.env.VITE_API_URL}/api/users/update`, {
const res = await fetch(`${import.meta.env.VITE_API_URL}/api/users/update`, {
method: 'POST',
credentials: 'include',
headers: {