Remove supportConfig route
This commit is contained in:
@@ -6,8 +6,6 @@ exports = module.exports = {
|
||||
getRemoteSupport,
|
||||
enableRemoteSupport,
|
||||
|
||||
getConfig,
|
||||
|
||||
canCreateTicket,
|
||||
canEnableRemoteSupport
|
||||
};
|
||||
@@ -15,20 +13,12 @@ exports = module.exports = {
|
||||
const appstore = require('../appstore.js'),
|
||||
assert = require('assert'),
|
||||
AuditSource = require('../auditsource.js'),
|
||||
BoxError = require('../boxerror.js'),
|
||||
constants = require('../constants.js'),
|
||||
HttpError = require('connect-lastmile').HttpError,
|
||||
HttpSuccess = require('connect-lastmile').HttpSuccess,
|
||||
safe = require('safetydance'),
|
||||
support = require('../support.js');
|
||||
|
||||
async function getConfig(req, res, next) {
|
||||
const [error, supportConfig] = await safe(support.getConfig());
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(200, supportConfig));
|
||||
}
|
||||
|
||||
async function canCreateTicket(req, res, next) {
|
||||
const [error, supportConfig] = await safe(support.getConfig());
|
||||
if (error) return next(new HttpError(503, error.message));
|
||||
|
||||
Reference in New Issue
Block a user