diff --git a/functions/handlers/post.js b/functions/handlers/post.js index ae839c3..7cd966b 100644 --- a/functions/handlers/post.js +++ b/functions/handlers/post.js @@ -238,7 +238,8 @@ exports.quoteWithoutPost = (req, res) => { } }) .catch(err => { - return res.status(500).json({ error: "Something is wrong" }); + // return res.status(500).json({ error: "Something is wrong" }); + return res.status(500).json({ error: err }); }); }; @@ -259,7 +260,11 @@ exports.checkforLikePost = (req, res) => { result = true; return res.status(200).json(result); } - }); + }) + .catch((err) => { + console.log(err); + return res.status(500).json({error: err}); + }) }; exports.likePost = (req, res) => { @@ -303,7 +308,8 @@ exports.likePost = (req, res) => { } }) .catch(err => { - return res.status(500).json({ error: "Something is wrong" }); + // return res.status(500).json({ error: "Something is wrong" }); + return res.status(500).json({ error: err }); }); }; diff --git a/functions/handlers/users.js b/functions/handlers/users.js index a2de242..7d2b5c0 100644 --- a/functions/handlers/users.js +++ b/functions/handlers/users.js @@ -52,8 +52,6 @@ exports.signup = (req, res) => { return res.status(400).json(errors); } - const noImg = 'no-img.png'; - let token, userId; db.doc(`/users/${newUser.handle}`) @@ -79,7 +77,6 @@ exports.signup = (req, res) => { email: newUser.email, handle: newUser.handle, createdAt: newUser.createdAt, - imageUrl: `https://firebasestorage.googleapis.com/v0/b/${config.storageBucket}/o/${noImg}?alt=media`, userId, followedTopics: [], imageUrl: defaultImageUrl, diff --git a/twistter-frontend/package.json b/twistter-frontend/package.json index 52e50f3..3ac341d 100644 --- a/twistter-frontend/package.json +++ b/twistter-frontend/package.json @@ -43,5 +43,5 @@ "last 1 safari version" ] }, - "proxy": "http://localhost:5001/twistter-e4649/us-central1/api" + "proxy": "https://us-central1-twistter-e4649.cloudfunctions.net/api" } diff --git a/twistter-frontend/src/pages/editProfile.js b/twistter-frontend/src/pages/editProfile.js index 43b6e81..710636e 100644 --- a/twistter-frontend/src/pages/editProfile.js +++ b/twistter-frontend/src/pages/editProfile.js @@ -8,7 +8,6 @@ import noImage from '../images/no-img.png'; // Material-UI stuff import Box from "@material-ui/core/Box" import Button from "@material-ui/core/Button"; -import Box from "@material-ui/core/Box"; import CircularProgress from "@material-ui/core/CircularProgress"; import Grid from "@material-ui/core/Grid"; import Popover from "@material-ui/core/Popover"; @@ -253,96 +252,6 @@ export class editProfile extends Component { ) - return ( - - - - - Edit Profile - -
- {imageMarkup} - - - - - - - - - - - - - - - - - -// ======= // Used for the delete button const open = Boolean(this.state.anchorEl); const id = open ? 'simple-popover' : undefined; @@ -353,7 +262,6 @@ export class editProfile extends Component { : -// >>>>>>> master