change get users
This commit is contained in:
parent
9a24af851d
commit
c3d665d62e
|
@ -107,10 +107,12 @@ router.post("/tokenIsValid", async (req, res) => {
|
||||||
|
|
||||||
router.get("/", auth, async (req, res) => {
|
router.get("/", auth, async (req, res) => {
|
||||||
const user = await User.findById(req.user);
|
const user = await User.findById(req.user);
|
||||||
console.log(user);
|
|
||||||
res.json({
|
res.json({
|
||||||
username: user.username,
|
username: user.username,
|
||||||
id: user._id,
|
id: user._id,
|
||||||
|
pricing: user.pricing,
|
||||||
|
email: user.email,
|
||||||
|
phonenumber: user.phonenumber
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
router.put("/update", async (req, res) => {
|
router.put("/update", async (req, res) => {
|
||||||
|
|
Loading…
Reference in New Issue