mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 13:27:49 +08:00
remove log out and currentUser routes on server
This commit is contained in:
parent
45c612c746
commit
40b978cb32
1 changed files with 0 additions and 19 deletions
19
server.js
19
server.js
|
@ -35,18 +35,6 @@ function authenticateToken(req, res, next) {
|
|||
|
||||
// API
|
||||
|
||||
app.get("/api/currentUser", authenticateToken, (req, res) => {
|
||||
User.findOne({ name: req.name }, (err, user) => {
|
||||
//user must have uid, displayName, email properties
|
||||
const retUser = {
|
||||
uid: user._id,
|
||||
displayName: user.name,
|
||||
email: user.email,
|
||||
};
|
||||
res.json({ user: retUser });
|
||||
});
|
||||
});
|
||||
|
||||
app.post("/api/updateName", (req, res) => {
|
||||
//this might be a put/patch request
|
||||
//update the name of user with given uid
|
||||
|
@ -94,13 +82,6 @@ app.post("/api/signIn", (req, res) => {
|
|||
});
|
||||
});
|
||||
|
||||
app.post("/api/signOut", (req, res) => {
|
||||
/* Takes user id and token? */
|
||||
//Logout user
|
||||
//This route isn't necessary for jwt authentication
|
||||
res.sendStatus(200);
|
||||
});
|
||||
|
||||
app.post("/api/signUp", (req, res) => {
|
||||
/* Takes name, email, password */
|
||||
//check if name has been taken
|
||||
|
|
Loading…
Reference in a new issue