From 5b6ffe0d97ad91ee6d16bf61988e9ca373e0866c Mon Sep 17 00:00:00 2001 From: davidebassan Date: Thu, 14 Mar 2024 17:14:48 +0100 Subject: [PATCH] fixed --- firebase/firebase.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firebase/firebase.js b/firebase/firebase.js index ad8e2d8..a8a21ba 100644 --- a/firebase/firebase.js +++ b/firebase/firebase.js @@ -2,7 +2,7 @@ const savePlayerScore = async (score, playerType) => { try { - const response = await fetch('http://localhost:3000/scores', { + const response = await fetch(`${process.env.EXPO_PUBLIC_BACK_URL}/scores`, { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -18,7 +18,7 @@ const savePlayerScore = async (score, playerType) => { const aggregateScoresByPlayerType = async (playerType) => { try { - const response = await fetch(`http://localhost:3000/scores/${playerType}`); + const response = await fetch(`${process.env.EXPO_PUBLIC_BACK_URL}/scores/${playerType}`); const data = await response.json(); return data.totalScore; } catch (error) {