use 405 when feature disabled

403 will logout the user
This commit is contained in:
Girish Ramakrishnan
2019-05-10 09:50:31 -07:00
parent ecc9415679
commit 7177f82041
2 changed files with 3 additions and 3 deletions

View File

@@ -36,7 +36,7 @@ function createTicket(req, res, next) {
function enableRemoteSupport(req, res, next) {
assert.strictEqual(typeof req.body, 'object');
if (!custom.features().remoteSupport) return next(new HttpError(403, 'feature disabled by admin'));
if (!custom.features().remoteSupport) return next(new HttpError(405, 'feature disabled by admin'));
if (typeof req.body.enable !== 'boolean') return next(new HttpError(400, 'enabled is required'));