fix hardcoded backend url

This commit is contained in:
Roger Oriol
2025-11-01 19:07:30 +01:00
parent 129e9e6b83
commit 5e237b6174
2 changed files with 3 additions and 1 deletions

Binary file not shown.

View File

@@ -1,6 +1,8 @@
// API client for backend communication
const API_BASE_URL = 'http://localhost:3000/api';
const API_BASE_URL = window.location.hostname === 'gym.rogi.casa'
? '/api'
: 'http://localhost:3000/api';
/**
* Fetch all gym sessions from the backend