user: add routes to set/clear avatar

This commit is contained in:
Girish Ramakrishnan
2020-07-10 07:23:33 -07:00
parent c6c584ff74
commit 8c7eff4e24
3 changed files with 38 additions and 12 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ function setAvatar(req, res, next) {
function clearAvatar(req, res, next) {
assert.strictEqual(typeof req.user, 'object');
users.clearAvatar(req.user, function (error) {
users.clearAvatar(req.user.id, function (error) {
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(202, {}));