Fix backend url conf

This commit is contained in:
T'JAMPENS QUENTIN p2406187 committed 2026-01-12 21:50:03 +01:00
1 parent 6723d42a5f
commit 1c10240b8d
19 files changed
+20 -20

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ export default async function createEvent(name, description, start, end) {
const csrfToken = await getXSRFToken();
try {
const response = await fetch(`http://${import.meta.env.VITE_API_URL}/api/events/create`, {
const response = await fetch(`${import.meta.env.VITE_API_URL}/api/events/create`, {
method: 'POST',
credentials: 'include',
headers: {
+1 -1
View File
@@ -1,7 +1,7 @@
export default async function getAllEvents() {
try {
const res = await fetch(`http://${import.meta.env.VITE_API_URL}/api/events/`, {
const res = await fetch(`${import.meta.env.VITE_API_URL}/api/events/`, {
method: 'GET',
credentials: 'include',
headers: {
+1 -1
View File
@@ -1,7 +1,7 @@
export default async function GetEventById(id) {
try {
const res = await fetch(`http://${import.meta.env.VITE_API_URL}/api/events/${id}`, {
const res = await fetch(`${import.meta.env.VITE_API_URL}/api/events/${id}`, {
method: 'GET',
credentials: 'include',
headers: {
+1 -1
View File
@@ -2,7 +2,7 @@ export default async function searchEvents(query) {
try {
const encodedQuery = encodeURIComponent(query);
const response = await fetch(
`http://${import.meta.env.VITE_API_URL}/api/events/search?query=${encodedQuery}`,
`${import.meta.env.VITE_API_URL}/api/events/search?query=${encodedQuery}`,
{
method: 'GET',
credentials: 'include',