Revert "Restructuring for new way of installing libreevent"

This reverts commit 688b0616cc.
This commit is contained in:
2024-08-26 11:21:52 +02:00
parent 688b0616cc
commit a68e42c4bb
223 changed files with 58 additions and 11 deletions
+35
View File
@@ -0,0 +1,35 @@
const path = require( 'path' );
module.exports = ( app, settings ) => {
app.get( '/eventAssets/:image', ( req, res ) => {
res.sendFile( path.join( __dirname + '/../assets/events/' + req.params.image ) );
} );
app.get( '/otherAssets/:image', ( req, res ) => {
res.sendFile( path.join( __dirname + '/../assets/' + req.params.image ) );
} );
app.get( '/supportFiles/:file', ( req, res ) => {
res.sendFile( path.join( __dirname + '/../ui/home/templates/' + settings.startPage + '/supportFiles/' + req.params.file ) );
} );
app.get( '/startPage/helperFunction', ( req, res ) => {
res.sendFile( path.join( __dirname + '/../ui/home/helper.js' ) );
} );
app.get( '/startPage/mainStyle', ( req, res ) => {
res.sendFile( path.join( __dirname + '/../ui/home/main.css' ) );
} );
app.get( '/startPage/assets/:image', ( req, res ) => {
res.sendFile( path.join( __dirname + '/../ui/home/templates/' + settings.startPage + '/assets/' + req.params.image ) );
} );
app.get( '/startPage/preview/:template', ( req, res ) => {
if ( req.session.loggedInAdmin ) {
res.sendFile( path.join( __dirname + '/../ui/home/templates/' + req.params.template + '/index.html' ) );
} else {
res.status( 403 ).send( 'unauthorized' );
}
} );
};