Remove supportConfig route

This commit is contained in:
Johannes Zellner
2023-12-03 16:24:16 +01:00
parent b9e584752b
commit 8927634636
7 changed files with 12 additions and 51 deletions
-10
View File
@@ -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));