clean up settings of event and general ones

This commit is contained in:
2023-08-10 20:54:53 +02:00
parent 5c87a5a282
commit d2c0257b8f
8 changed files with 100 additions and 82 deletions

View File

@@ -17,7 +17,7 @@ class POSTHandler {
db.getJSONData( 'booked' ).then( dat => {
this.allSelectedSeats = dat;
} );
// this.allSelectedSeats = { 'test2': { 'secAr1s1': { 'id': 'secAr1s1', 'component': 1 } } };
// TODO: Load from event db
this.ticketTotals = { 'test2': { 'ticket1': 5, 'ticket2': 5 } };
this.settings = JSON.parse( fs.readFileSync( path.join( __dirname + '/../../config/settings.config.json' ) ) );
}

View File

@@ -49,7 +49,7 @@ module.exports = ( app, settings ) => {
'product_data': {
'name': data[ event ][ item ].name,
},
'currency': events[ event ].currency,
'currency': settings.currency,
'unit_amount': Math.round( parseFloat( events[ event ][ 'categories' ][ data[ event ][ item ].category ].price[ data[ event ][ item ][ 'ticketOption' ] ] ) * 100 ),
},
'quantity': data[ event ][ item ].count ?? 1,

View File

@@ -56,7 +56,7 @@ class TicketGenerator {
}
}
// TODO: Maybe move to subprocesses
// TODO: FUTURE: move to subprocesses
queueHandler () {
if ( !this.isRunning ) {
this.isRunning = true;