Back-end for verifying users

This commit is contained in:
2019-10-31 15:12:22 -04:00
parent ca1d86acf1
commit 325d37f0de
2 changed files with 63 additions and 1 deletions

View File

@@ -16,7 +16,9 @@ const {
login,
signup,
deleteUser,
updateProfileInfo
updateProfileInfo,
verifyUser,
unverifyUser
} = require("./handlers/users");
// Adds a user to the database and registers them in firebase with
@@ -41,6 +43,14 @@ app.post("/updateProfileInfo", fbAuth, updateProfileInfo);
app.get("/user", fbAuth, getAuthenticatedUser);
// Verifies the user sent to the request
// Must be run by the Admin user
app.post("/verifyUser", fbAuth, verifyUser);
// Unverifies the user sent to the request
// Must be run by admin
app.post("/unverifyUser", fbAuth, unverifyUser);
/*------------------------------------------------------------------*
* handlers/post.js *
*------------------------------------------------------------------*/