add random password to guest
This commit is contained in:
parent
ff3d6c2c24
commit
0ec92dd5e9
1 changed files with 2 additions and 1 deletions
|
@ -71,8 +71,9 @@ const guest = async (req, res, next) => {
|
||||||
const email = null;
|
const email = null;
|
||||||
// id generator returns `
|
// id generator returns `
|
||||||
const id = null;
|
const id = null;
|
||||||
const user = { username, email, id };
|
const user = { username, email, id, password };
|
||||||
signToken(res, user);
|
signToken(res, user);
|
||||||
|
delete user.password;
|
||||||
res.send(user);
|
res.send(user);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
|
Loading…
Reference in a new issue