Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
davidebassan committed Mar 14, 2024
1 parent 8e2634a commit 5b6ffe0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions firebase/firebase.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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) {
Expand Down

0 comments on commit 5b6ffe0

Please sign in to comment.