Start of the edit profile functions.

This commit is contained in:
Clayton Wilson 2019-09-23 22:58:06 -04:00
parent 709af8007d
commit bcdd452aa8

View File

@ -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); exports.api = functions.https.onRequest(app);