feat: added GET user route for api v3

This commit is contained in:
Julian Lam
2021-05-26 12:35:37 -04:00
parent 48b8e3bb3f
commit d2960aeb09
3 changed files with 29 additions and 0 deletions

View File

@@ -43,6 +43,10 @@ Users.exists = async (req, res) => {
helpers.formatApiResponse(200, res);
};
Users.get = async (req, res) => {
helpers.formatApiResponse(200, res, await user.getUserData(req.params.uid));
};
Users.update = async (req, res) => {
const userObj = await api.users.update(req, { ...req.body, uid: req.params.uid });
helpers.formatApiResponse(200, res, userObj);