respond with user.toAuthJson for user

This commit is contained in:
2018-06-01 14:17:56 +03:00
parent 21477e3ef1
commit 33b802d9e7

View File

@@ -17,7 +17,7 @@ router.get(
asyncHelper(async (req, res) => {
const { id } = req.user;
const user = await User.findById(id).exec();
res.json({ success: true, data: user.toJson() });
res.json({ success: true, data: user.toAuthJson() });
}),
);