refactor: deprecate picture update socket call, new API routes for picture update

This commit is contained in:
Julian Lam
2021-09-03 15:25:26 -04:00
parent e33e046f15
commit 0a41741b7e
7 changed files with 103 additions and 47 deletions

View File

@@ -76,6 +76,11 @@ Users.deleteMany = async (req, res) => {
helpers.formatApiResponse(200, res);
};
Users.changePicture = async (req, res) => {
await api.users.changePicture(req, { ...req.body, uid: req.params.uid });
helpers.formatApiResponse(200, res);
};
Users.updateSettings = async (req, res) => {
const settings = await api.users.updateSettings(req, { ...req.body, uid: req.params.uid });
helpers.formatApiResponse(200, res, settings);