mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 05:14:23 +00:00
add another db table (sql dbs)
This commit is contained in:
@@ -89,7 +89,7 @@ if ( settings.init ) {
|
||||
}
|
||||
|
||||
console.log( '[ Server ] loading plugins' );
|
||||
pluginManager.load( app, settings );
|
||||
// pluginManager.load( app, settings );
|
||||
|
||||
app.use( ( request, response ) => {
|
||||
response.sendFile( file );
|
||||
|
||||
@@ -40,11 +40,14 @@ class SQLDB {
|
||||
this.sqlConnection.query( 'DROP TABLE libreevent_users;', ( error ) => {
|
||||
if ( error ) if ( error.code !== 'ER_BAD_TABLE_ERROR' ) throw error;
|
||||
this.sqlConnection.query( 'DROP TABLE libreevent_admin;', ( error ) => {
|
||||
if ( error ) if ( error.code !== 'ER_BAD_TABLE_ERROR' ) throw error;
|
||||
this.sqlConnection.query( 'DROP TABLE libreevent_temp;', ( error ) => {
|
||||
if ( error ) if ( error.code !== 'ER_BAD_TABLE_ERROR' ) throw error;
|
||||
return 'done';
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
}
|
||||
|
||||
async setupDB ( ) {
|
||||
@@ -54,10 +57,13 @@ class SQLDB {
|
||||
} );
|
||||
this.sqlConnection.query( 'CREATE TABLE libreevent_users ( account_id INT ( 10 ) NOT NULL AUTO_INCREMENT, email TINYTEXT NOT NULL, pass TEXT, street TEXT, house_number TINYTEXT, country TEXT, phone TEXT, name TEXT, first_name TEXT, data VARCHAR( 10000 ), PRIMARY KEY ( account_id ) ) ENGINE=INNODB;', ( error ) => {
|
||||
if ( error ) if ( error.code !== 'ER_TABLE_EXISTS_ERROR' ) throw error;
|
||||
this.sqlConnection.query( 'CREATE TABLE libreevent_orders ( order_id INT ( 10 ) NOT NULL AUTO_INCREMENT, account_id INT ( 10 ) NOT NULL, seats VARCHAR( 30000 ), PRIMARY KEY ( order_id ), FOREIGN KEY ( account_id ) REFERENCES libreevent_users( account_id ) ) ENGINE=INNODB;', ( error ) => {
|
||||
this.sqlConnection.query( 'CREATE TABLE libreevent_orders ( order_id INT ( 10 ) NOT NULL AUTO_INCREMENT, account_id INT ( 10 ) NOT NULL, seats VARCHAR( 60000 ), PRIMARY KEY ( order_id ), FOREIGN KEY ( account_id ) REFERENCES libreevent_users( account_id ) ) ENGINE=INNODB;', ( error ) => {
|
||||
if ( error ) if ( error.code !== 'ER_TABLE_EXISTS_ERROR' ) throw error;
|
||||
this.sqlConnection.query( 'CREATE TABLE libreevent_admin ( account_id INT NOT NULL AUTO_INCREMENT, email TINYTEXT, pass TEXT, permissions VARCHAR( 1000 ), PRIMARY KEY ( account_id ) );', ( error ) => {
|
||||
if ( error ) if ( error.code !== 'ER_TABLE_EXISTS_ERROR' ) throw error;
|
||||
this.sqlConnection.query( 'CREATE TABLE libreevent_temp ( entry_id INT NOT NULL AUTO_INCREMENT, user_id TINYTEXT, pass TEXT, data VARCHAR( 60000 ), PRIMARY KEY ( entry_id ) );', ( error ) => {
|
||||
if ( error ) if ( error.code !== 'ER_TABLE_EXISTS_ERROR' ) throw error;
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
|
||||
@@ -255,6 +255,7 @@ export default {
|
||||
user a link to download the ticket. A mail has been sent to user automatically.
|
||||
*/
|
||||
let prep = this.$refs.notification.createNotification( 'Preparing payment...', 20, 'progress', 'high' );
|
||||
|
||||
setTimeout( () => {
|
||||
this.$refs.notification.cancelNotification( prep );
|
||||
this.$refs.notification.createNotification( 'Payment prepared, redirecting...', 5, 'progress', 'high' );
|
||||
|
||||
Reference in New Issue
Block a user