From 5e237b617404c0c5fdbf410e7b2b184c0eafe354 Mon Sep 17 00:00:00 2001 From: Roger Oriol Date: Sat, 1 Nov 2025 19:07:30 +0100 Subject: [PATCH] fix hardcoded backend url --- data/gym-tracker.db | Bin 12288 -> 12288 bytes frontend/api.js | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/data/gym-tracker.db b/data/gym-tracker.db index 1906df0501d5dad9aeef1ade84cb825d99ff4fbc..5d466f9945e2d09bfd469850009db7de645ad978 100644 GIT binary patch delta 183 zcmZojXh@hK&B#1a#+i|MW5N=C4krFo2L4U_shb4_BKd>8nOH&}%#93;Omz(nbd3$8m3&guiz-;vh<+O(d5e?9+=&4LPx`873|Lm7#&hiUQ+eGLHPX)m+@ delta 66 zcmZojXh@hK&B!!S#+i|6W5N=CHb(wU4E&om3o6XxpBTW!=EKMms^~cRj=sv|JMtPp S*&7V}Hz2YN29s~-YXAU$5)>K$ diff --git a/frontend/api.js b/frontend/api.js index e4715ae..dd35b2a 100644 --- a/frontend/api.js +++ b/frontend/api.js @@ -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