diff --git a/firebase.json b/firebase.json index 896c687..ad362e4 100644 --- a/firebase.json +++ b/firebase.json @@ -17,11 +17,7 @@ "firebase.json", "**/.*", "**/node_modules/**" - ], - "rewrites": [{ - "source": "/feed", - "destination": "/feed.html" - }] + ] }, "storage": { "rules": "storage.rules" diff --git a/functions/index.js b/functions/index.js index 3342c37..da1d19f 100644 --- a/functions/index.js +++ b/functions/index.js @@ -119,15 +119,15 @@ app.post('/updateProfileInfo', (req, res) => { // Update the database entry for this user db.collection('users').doc(req.user.handle).set(profileData, {merge: true}) - .then((data) =>{ + .then(() => { console.log(`${req.user.handle}'s profile info has been updated.`) return res.status(200).json({general: `${req.user.handle}'s profile info has been updated.`}); }) .catch((err) => { - res.status(500).json({ + console.error(err); + return res.status(500).json({ error: 'Error updating profile data' }); - console.error(err); }) });