Add enableSshSupport option to support tickets

This commit is contained in:
Johannes Zellner
2020-10-05 15:20:14 +02:00
parent b7ed6d8463
commit 2817ea833a
2 changed files with 2 additions and 3 deletions

View File

@@ -413,11 +413,9 @@ function createTicket(info, auditSource, callback) {
if (error) return callback(error);
if (result) info.app = result;
let url = settings.apiServerOrigin() + '/api/v1/ticket';
info.supportEmail = constants.SUPPORT_EMAIL; // destination address for tickets
superagent.post(url).query({ accessToken: token }).send(info).timeout(10 * 1000).end(function (error, result) {
superagent.post(`${settings.apiServerOrigin()}/api/v1/ticket`).query({ accessToken: token }).send(info).timeout(10 * 1000).end(function (error, result) {
if (error && !error.response) return callback(new BoxError(BoxError.NETWORK_ERROR, error.message));
if (result.statusCode === 401) return callback(new BoxError(BoxError.INVALID_CREDENTIALS));
if (result.statusCode === 422) return callback(new BoxError(BoxError.LICENSE_ERROR, result.body.message));