Profile image upload frontend and backend finished

This commit is contained in:
2019-10-27 18:06:47 -04:00
parent 60f83da514
commit 44d3450b10
7 changed files with 210 additions and 16 deletions

View File

@@ -16,7 +16,8 @@ const {
login,
signup,
deleteUser,
updateProfileInfo
updateProfileInfo,
uploadProfileImage
} = require("./handlers/users");
// Adds a user to the database and registers them in firebase with
@@ -39,8 +40,13 @@ app.get("/getProfileInfo", fbAuth, getProfileInfo);
// Updates the currently logged in user's profile information
app.post("/updateProfileInfo", fbAuth, updateProfileInfo);
// Returns all user data for the logged in user.
// Used when setting the state in Redux.
app.get("/user", fbAuth, getAuthenticatedUser);
// Uploads a profile image
app.post("/user/image", fbAuth, uploadProfileImage);
/*------------------------------------------------------------------*
* handlers/post.js *
*------------------------------------------------------------------*/