More minor updates to fix things

pull/15/head
ClaraCrazy 2024-09-17 20:44:42 +02:00
parent 4eb3be36e1
commit f178d3edd8
3 changed files with 13 additions and 13 deletions

2
app.js
View File

@ -1,7 +1,7 @@
#!/usr/bin/env node #!/usr/bin/env node
/* eslint unicorn/no-process-exit: 0 */ /* 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: // Until node 11 adds flatmap, we use this:
require('array.prototype.flatmap').shim() require('array.prototype.flatmap').shim()

View File

@ -14,11 +14,11 @@ const sanitizeAddress = param('address').customSanitizer(
router.get('^/:address([^@/]+@[^@/]+)', sanitizeAddress, (req, res, _next) => { router.get('^/:address([^@/]+@[^@/]+)', sanitizeAddress, (req, res, _next) => {
const mailProcessingService = req.app.get('mailProcessingService') const mailProcessingService = req.app.get('mailProcessingService')
res.render('inbox', { res.render('inbox', {
title: `${config.branding[0]} | ` + req.params.address, title: `${config.http.branding[0]} | ` + req.params.address,
address: req.params.address, address: req.params.address,
mailSummaries: mailProcessingService.getMailSummaries(req.params.address), mailSummaries: mailProcessingService.getMailSummaries(req.params.address),
madeby: config.branding[1], madeby: config.http.branding[1],
madebysite: config.branding[2] madebysite: config.http.branding[2]
}) })
}) })
@ -40,8 +40,8 @@ router.get(
address: req.params.address, address: req.params.address,
mail, mail,
uid: req.params.uid, uid: req.params.uid,
madeby: config.branding[1], madeby: config.http.branding[1],
madebysite: config.branding[2] madebysite: config.http.branding[2]
}) })
} else { } else {
res.render( res.render(
@ -49,8 +49,8 @@ router.get(
{ {
address: req.params.address, address: req.params.address,
message: 'This mail could not be found. It either does not exist or has been deleted from our servers!', message: 'This mail could not be found. It either does not exist or has been deleted from our servers!',
madeby: config.branding[1], madeby: config.http.branding[1],
madebysite: config.branding[2], madebysite: config.http.branding[2],
} }
) )
} }

View File

@ -7,11 +7,11 @@ const config = require('../../../application/config')
router.get('/', (req, res, _next) => { router.get('/', (req, res, _next) => {
res.render('login', { res.render('login', {
title: `${config.branding[0]} | Your temporary Inbox`, title: `${config.http.branding[0]} | Your temporary Inbox`,
username: randomWord(), username: randomWord(),
domains: config.email.domains, domains: config.email.domains,
madeby: config.branding[1], madeby: config.http.branding[1],
madebysite: config.branding[2] madebysite: config.http.branding[2]
}) })
}) })
@ -42,8 +42,8 @@ router.post(
username: req.body.username, username: req.body.username,
domain: req.body.domain, domain: req.body.domain,
userInputError: true, userInputError: true,
madeby: config.branding[1], madeby: config.http.branding[1],
madebysite: config.branding[2] madebysite: config.http.branding[2]
}) })
} }