From bcdd452aa816e547c21cf0f434229794ee132ed4 Mon Sep 17 00:00:00 2001 From: Clayton Wilson Date: Mon, 23 Sep 2019 22:58:06 -0400 Subject: [PATCH] Start of the edit profile functions. --- functions/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/functions/index.js b/functions/index.js index 9130d2f..27262c6 100644 --- a/functions/index.js +++ b/functions/index.js @@ -75,4 +75,23 @@ app.post('/postUser', (req, res) => { }); }); +// Returns all profile data of the currently logged in user +app.get('getProfileInfo', (req, res) => { + +}); + +// Updates the currently logged in user's profile information +app.post('/updateProfileInfo', FBAuth, (req, res) => { + const profileData = { + handle: req.user.handle, + firstName: req.body.firstName, + lastName: req.body.lastName, + imageUrl: req.body.imageUrl, + }; + + return res.status(200).json(profileData); + + +}); + exports.api = functions.https.onRequest(app); \ No newline at end of file