correction of API routes url

This commit is contained in:
2025-11-29 17:54:27 +01:00
parent 624e8edbe4
commit b0d8eca5a3
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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: {
+1 -1
View File
@@ -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',
+1 -1
View File
@@ -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'
});
+1 -1
View File
@@ -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: {
+1 -1
View File
@@ -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: {