From b0d8eca5a3e509ce1dbc6ffb09ef52f1ba42280b Mon Sep 17 00:00:00 2001 From: Giovanni-Josserand Date: Sat, 29 Nov 2025 17:54:27 +0100 Subject: [PATCH] correction of API routes url --- src/utils/getUser.js | 2 +- src/utils/getUserNotifications.js | 2 +- src/utils/getXSRF.js | 2 +- src/utils/login.js | 2 +- src/utils/register.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/getUser.js b/src/utils/getUser.js index 6826525..b5c817d 100644 --- a/src/utils/getUser.js +++ b/src/utils/getUser.js @@ -1,6 +1,6 @@ export default async function getUser() { try { - const res = await fetch('http://localhost:8000/api/me', { + const res = await fetch('http://localhost:80/api/users/me', { method: 'GET', credentials: 'include', headers: { diff --git a/src/utils/getUserNotifications.js b/src/utils/getUserNotifications.js index 69d2431..1b93395 100644 --- a/src/utils/getUserNotifications.js +++ b/src/utils/getUserNotifications.js @@ -1,7 +1,7 @@ export default async function getUserNotifications() { try { const response = await fetch( - 'http://localhost:8000/api/users/1/notifications', + 'http://localhost:80/api/users/1/notifications', { method: 'GET', credentials: 'include', diff --git a/src/utils/getXSRF.js b/src/utils/getXSRF.js index 1bed25f..46a9415 100644 --- a/src/utils/getXSRF.js +++ b/src/utils/getXSRF.js @@ -1,5 +1,5 @@ export default async function getXSRFToken() { - const response = await fetch('http://localhost:8000/sanctum/csrf-cookie', { + const response = await fetch('http://localhost:80/sanctum/csrf-cookie', { method: 'GET', credentials: 'include' }); diff --git a/src/utils/login.js b/src/utils/login.js index a08151b..6107185 100644 --- a/src/utils/login.js +++ b/src/utils/login.js @@ -4,7 +4,7 @@ export default async function login(email, password) { const csrfToken = await getXSRFToken(); try { - const response = await fetch('http://localhost:8000/api/users/login', { + const response = await fetch('http://localhost:80/api/users/login', { method: 'POST', credentials: 'include', headers: { diff --git a/src/utils/register.js b/src/utils/register.js index 1612bf8..2cdacf6 100644 --- a/src/utils/register.js +++ b/src/utils/register.js @@ -4,7 +4,7 @@ export default async function register(email, password, name, lastname) { const csrfToken = await getXSRFToken(); try { - const response = await fetch('http://localhost:8000/api/users/register', { + const response = await fetch('http://localhost:80/api/users/register', { method: 'POST', credentials: 'include', headers: {