Add explicit billing issue ticket type

This commit is contained in:
Johannes Zellner
2023-08-25 12:08:44 +02:00
parent 34c997401f
commit 0e507bad7e
4 changed files with 6 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ async function canCreateTicket(req, res, next) {
async function createTicket(req, res, next) {
assert.strictEqual(typeof req.user, 'object');
const VALID_TYPES = [ 'feedback', 'ticket', 'app_missing', 'app_error', 'upgrade_request', 'email_error' ];
const VALID_TYPES = [ 'feedback', 'ticket', 'app_missing', 'app_error', 'upgrade_request', 'email_error', 'billing' ];
if (typeof req.body.type !== 'string' || !req.body.type) return next(new HttpError(400, 'type must be string'));
if (VALID_TYPES.indexOf(req.body.type) === -1) return next(new HttpError(400, 'unknown type'));