Even better.. twig can handle lists

pull/16/head
ClaraCrazy 2024-10-02 14:50:40 +02:00
parent 347db6cbc7
commit d66d76c9f9
No known key found for this signature in database
GPG Key ID: EBBC896ACB497011
3 changed files with 9 additions and 23 deletions

View File

@ -17,9 +17,7 @@ router.get('^/:address([^@/]+@[^@/]+)', sanitizeAddress, (req, res, _next) => {
title: `${config.http.branding[0]} | ` + req.params.address,
address: req.params.address,
mailSummaries: mailProcessingService.getMailSummaries(req.params.address),
servicename: config.http.branding[0],
madeby: config.http.branding[1],
madebysite: config.http.branding[2]
branding: config.http.branding,
})
})
@ -46,9 +44,7 @@ router.get(
address: req.params.address,
mail,
uid: req.params.uid,
servicename: config.http.branding[0],
madeby: config.http.branding[1],
madebysite: config.http.branding[2]
branding: config.http.branding,
})
} else {
res.render(
@ -56,9 +52,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!',
servicename: config.http.branding[0],
madeby: config.http.branding[1],
madebysite: config.http.branding[2],
branding: config.http.branding
}
)
}
@ -131,9 +126,7 @@ router.get(
{
address: req.params.address,
message: 'This attachment could not be found. It either does not exist or has been deleted from our servers!',
servicename: config.http.branding[0],
madeby: config.http.branding[1],
madebysite: config.http.branding[2],
branding: config.http.branding,
}
)
}
@ -172,9 +165,7 @@ 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!',
servicename: config.http.branding[0],
madeby: config.http.branding[1],
madebysite: config.http.branding[2],
branding: config.http.branding,
}
)
}

View File

@ -10,9 +10,7 @@ router.get('/', (req, res, _next) => {
title: `${config.http.branding[0]} | Your temporary Inbox`,
username: randomWord(),
domains: config.email.domains,
servicename: config.http.branding[0],
madeby: config.http.branding[1],
madebysite: config.http.branding[2]
branding: config.http.branding,
})
})
@ -42,10 +40,7 @@ router.post(
userInputError: true,
title: `${config.http.branding[0]} | Your temporary Inbox`,
username: randomWord(),
domains: config.email.domains,
servicename: config.http.branding[0],
madeby: config.http.branding[1],
madebysite: config.http.branding[2]
branding: config.http.branding,
})
}

View File

@ -28,7 +28,7 @@
{% block footer %}
<section class="container footer">
<hr>
<h4>{{ servicename }} offered by <a href="{{ madebysite }}" style="text-decoration:underline" target="_blank">{{ madeby }}</a> | All Emails will be deleted after 48hrs | This project is <a href="https://github.com/crazyco-xyz/48hr.email" style="text-decoration:underline" target="_blank">open-source ♥</a></h4>
<h4>{{ branding[0] }} offered by <a href="{{ branding[2] }}" style="text-decoration:underline" target="_blank">{{ branding[1] }}</a> | All Emails will be deleted after 48hrs | This project is <a href="https://github.com/crazyco-xyz/48hr.email" style="text-decoration:underline" target="_blank">open-source ♥</a></h4>
</section>
{% endblock %}