diff --git a/src/server/app.js b/src/server/app.js index 5220525..06f2e63 100644 --- a/src/server/app.js +++ b/src/server/app.js @@ -54,9 +54,9 @@ const settings = JSON.parse( fs.readFileSync( path.join( __dirname + '/config/se console.log( '[ Server ] Setting up static routes' ); if ( settings.init ) { - app.use( express.static( '../webapp/main/dist' ) ); + app.use( express.static( 'webapp/main/dist' ) ); } else { - app.use( express.static( '../webapp/setup/dist' ) ); + app.use( express.static( 'webapp/setup/dist' ) ); } // initialise express with middlewares @@ -76,7 +76,7 @@ app.use( expressSession( { // app.use( bodyParser.json() ); app.use( cookieParser() ); -let file = path.join( __dirname + '/webapp/index.html' ); +let file = path.join( __dirname + '/webapp/main/dist/index.html' ); console.log( '[ Server ] loading backend components' ); if ( settings.init ) { @@ -86,7 +86,7 @@ if ( settings.init ) { require( './backend/userRoutes.js' )( app, settings ); // user routes } else { require( './setup/setupRoutes.js' )( app, settings ); // setup routes - file = path.join( __dirname + '/../webapp/setup/dist/index.html' ); + file = path.join( __dirname + '/webapp/setup/dist/index.html' ); } console.log( '[ Server ] loading plugins' ); diff --git a/src/server/config/settings.config.json b/src/server/config/settings.config.json index 6a3e9d1..6a01829 100644 --- a/src/server/config/settings.config.json +++ b/src/server/config/settings.config.json @@ -1,6 +1,7 @@ { - "init": true, + "init": false, "twoFA": "allow", + "setupKey": "hello world", "twoFAMode": "enhanced", "db": "mysql", "payments": "stripe", diff --git a/src/server/setup/setupRoutes.js b/src/server/setup/setupRoutes.js index 1fa016e..3e1b4da 100644 --- a/src/server/setup/setupRoutes.js +++ b/src/server/setup/setupRoutes.js @@ -7,11 +7,19 @@ * */ +const db = require( '../backend/db/db.js' ); + module.exports = ( app, settings ) => { /* Admin login route that checks the password */ - app.get( '/setup/start', ( request, response ) => {} ); + app.get( '/setup/start', ( request, response ) => { + if ( request.query.token === settings.setupToken ) { + response.send( 'ok' ); + } else { + response.send( 'incorrect' ); + } + } ); } \ No newline at end of file diff --git a/src/server/webapp b/src/server/webapp index 2b6e2f3..210cd69 120000 --- a/src/server/webapp +++ b/src/server/webapp @@ -1 +1 @@ -../webapp/main/dist/ \ No newline at end of file +../webapp/ \ No newline at end of file diff --git a/src/webapp/main/src/views/admin/events/AnalyticsView.vue b/src/webapp/main/src/views/admin/events/AnalyticsView.vue index b975b19..d580229 100644 --- a/src/webapp/main/src/views/admin/events/AnalyticsView.vue +++ b/src/webapp/main/src/views/admin/events/AnalyticsView.vue @@ -11,6 +11,7 @@
Get insights into tickets sold, people checked in, available tickets, revenue, etc, in real time!
+Coming soon! (in the next major update)
Congratulations on finishing the setup of libreǝvent!
Please restart the node.js application to have it load the actual user interface for libreevent. You may then log in at {{ windowURL }}
+In the admin panel, there are a few things you still need to change. You may find a list of all things here
+You may choose all of the below payment methods, but we recommend to only select one payment gateway for simplicity. Recommended: Either Stripe or Adyen. See the comparison of the different payment methods here
-You may find more infos about this part here
- -You may choose all of the below payment methods, but we recommend to only select one payment gateway for simplicity. Recommended: Either Stripe or Adyen. See the comparison of the different payment methods here
-You may find more infos about this part here
- -You may choose all of the below payment methods, but we recommend to only select one payment gateway for simplicity. Recommended: Either Stripe or Adyen. See the comparison of the different payment methods here
-You may find more infos about this part here
- -