Remove now unused tutorial route and business logic
We can bring that back again if needed
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
exports = module.exports = {
|
||||
get: get,
|
||||
update: update,
|
||||
changePassword: changePassword,
|
||||
setShowTutorial: setShowTutorial
|
||||
changePassword: changePassword
|
||||
};
|
||||
|
||||
var assert = require('assert'),
|
||||
@@ -66,17 +65,3 @@ function changePassword(req, res, next) {
|
||||
next(new HttpSuccess(204));
|
||||
});
|
||||
}
|
||||
|
||||
function setShowTutorial(req, res, next) {
|
||||
assert.strictEqual(typeof req.user, 'object');
|
||||
assert.strictEqual(typeof req.body, 'object');
|
||||
|
||||
if (typeof req.body.showTutorial !== 'boolean') return next(new HttpError(400, 'showTutorial must be a boolean.'));
|
||||
|
||||
user.setShowTutorial(req.user.id, req.body.showTutorial, function (error) {
|
||||
if (error && error.reason === UserError.NOT_FOUND) return next(new HttpError(403, 'Wrong password'));
|
||||
if (error) return next(new HttpError(500, error));
|
||||
|
||||
next(new HttpSuccess(204));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user