mirror of
https://github.com/Crazyco-xyz/48hr.email.git
synced 2025-12-14 13:56:32 +01:00
automatically generate example inbox url
This commit is contained in:
parent
e158fac414
commit
9d991486ae
3 changed files with 36 additions and 36 deletions
|
|
@ -1,6 +1,6 @@
|
|||
const express = require('express')
|
||||
const router = new express.Router()
|
||||
const {check, validationResult} = require('express-validator')
|
||||
const { check, validationResult } = require('express-validator')
|
||||
|
||||
const randomWord = require('random-word')
|
||||
const config = require('../../../application/config')
|
||||
|
|
@ -16,6 +16,7 @@ router.get('/', (req, res, _next) => {
|
|||
purgeTime: purgeTime,
|
||||
domains: helper.getDomains(),
|
||||
branding: config.http.branding,
|
||||
example: config.email.examples.account,
|
||||
})
|
||||
})
|
||||
|
||||
|
|
@ -33,9 +34,8 @@ router.get('/logout', (req, res, _next) => {
|
|||
})
|
||||
|
||||
router.post(
|
||||
'/',
|
||||
[
|
||||
check('username').isLength({min: 1}),
|
||||
'/', [
|
||||
check('username').isLength({ min: 1 }),
|
||||
check('domain').isIn(config.email.domains)
|
||||
],
|
||||
(req, res) => {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
{% block body %}
|
||||
|
||||
<div style="float: right; text-align: end;">
|
||||
<a href="/inbox/example@48hr.email">Example Inbox</a>
|
||||
<a href="/inbox/{{ example }}">Example Inbox</a>
|
||||
</div>
|
||||
<div id="login">
|
||||
<h1>Welcome!</h1>
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "48hr.email",
|
||||
"version": "1.5.4",
|
||||
"version": "1.6.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "48hr.email",
|
||||
"version": "1.5.4",
|
||||
"version": "1.6.1",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"array.prototype.flatmap": "^1.3.2",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue