diff --git a/app.js b/app.js index 31bb52e..d581952 100644 --- a/app.js +++ b/app.js @@ -1,7 +1,7 @@ #!/usr/bin/env node /* eslint unicorn/no-process-exit: 0 */ -const config = require('./application/config') +const config = require('./application/config.js') // Until node 11 adds flatmap, we use this: require('array.prototype.flatmap').shim() diff --git a/infrastructure/web/routes/inbox.js b/infrastructure/web/routes/inbox.js index 1d01c6d..af03255 100644 --- a/infrastructure/web/routes/inbox.js +++ b/infrastructure/web/routes/inbox.js @@ -14,11 +14,11 @@ const sanitizeAddress = param('address').customSanitizer( router.get('^/:address([^@/]+@[^@/]+)', sanitizeAddress, (req, res, _next) => { const mailProcessingService = req.app.get('mailProcessingService') res.render('inbox', { - title: `${config.branding[0]} | ` + req.params.address, + title: `${config.http.branding[0]} | ` + req.params.address, address: req.params.address, mailSummaries: mailProcessingService.getMailSummaries(req.params.address), - madeby: config.branding[1], - madebysite: config.branding[2] + madeby: config.http.branding[1], + madebysite: config.http.branding[2] }) }) @@ -40,8 +40,8 @@ router.get( address: req.params.address, mail, uid: req.params.uid, - madeby: config.branding[1], - madebysite: config.branding[2] + madeby: config.http.branding[1], + madebysite: config.http.branding[2] }) } else { res.render( @@ -49,8 +49,8 @@ router.get( { address: req.params.address, message: 'This mail could not be found. It either does not exist or has been deleted from our servers!', - madeby: config.branding[1], - madebysite: config.branding[2], + madeby: config.http.branding[1], + madebysite: config.http.branding[2], } ) } diff --git a/infrastructure/web/routes/login.js b/infrastructure/web/routes/login.js index c09004e..4e61a46 100644 --- a/infrastructure/web/routes/login.js +++ b/infrastructure/web/routes/login.js @@ -7,11 +7,11 @@ const config = require('../../../application/config') router.get('/', (req, res, _next) => { res.render('login', { - title: `${config.branding[0]} | Your temporary Inbox`, + title: `${config.http.branding[0]} | Your temporary Inbox`, username: randomWord(), domains: config.email.domains, - madeby: config.branding[1], - madebysite: config.branding[2] + madeby: config.http.branding[1], + madebysite: config.http.branding[2] }) }) @@ -42,8 +42,8 @@ router.post( username: req.body.username, domain: req.body.domain, userInputError: true, - madeby: config.branding[1], - madebysite: config.branding[2] + madeby: config.http.branding[1], + madebysite: config.http.branding[2] }) }