add logo upload

This commit is contained in:
2023-09-30 14:01:34 +02:00
parent 9e9c4b0ec6
commit a84e4197d4
6 changed files with 81 additions and 16 deletions

View File

@@ -26,7 +26,10 @@ module.exports = ( app, settings ) => {
} );
app.get( '/startPage/preview/:template', ( req, res ) => {
// TODO: only allow when logged in
res.sendFile( path.join( __dirname + '/../ui/home/templates/' + req.params.template + '/index.html' ) );
if ( req.session.loggedInAdmin ) {
res.sendFile( path.join( __dirname + '/../ui/home/templates/' + req.params.template + '/index.html' ) );
} else {
res.status( 403 ).send( 'unauthorized' );
}
} );
};