change get users

This commit is contained in:
Priyatham Sai Chand 2021-04-26 17:48:24 +05:30
parent 9a24af851d
commit c3d665d62e
No known key found for this signature in database
GPG Key ID: 4CB4C85E75F5A80C
1 changed files with 3 additions and 1 deletions

View File

@ -107,10 +107,12 @@ router.post("/tokenIsValid", async (req, res) => {
router.get("/", auth, async (req, res) => {
const user = await User.findById(req.user);
console.log(user);
res.json({
username: user.username,
id: user._id,
pricing: user.pricing,
email: user.email,
phonenumber: user.phonenumber
});
});
router.put("/update", async (req, res) => {