mirror of
https://github.com/Crazyco-xyz/48hr.email.git
synced 2025-12-14 22:06: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 express = require('express')
|
||||||
const router = new express.Router()
|
const router = new express.Router()
|
||||||
const {check, validationResult} = require('express-validator')
|
const { check, validationResult } = require('express-validator')
|
||||||
|
|
||||||
const randomWord = require('random-word')
|
const randomWord = require('random-word')
|
||||||
const config = require('../../../application/config')
|
const config = require('../../../application/config')
|
||||||
|
|
@ -16,6 +16,7 @@ router.get('/', (req, res, _next) => {
|
||||||
purgeTime: purgeTime,
|
purgeTime: purgeTime,
|
||||||
domains: helper.getDomains(),
|
domains: helper.getDomains(),
|
||||||
branding: config.http.branding,
|
branding: config.http.branding,
|
||||||
|
example: config.email.examples.account,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -33,9 +34,8 @@ router.get('/logout', (req, res, _next) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
router.post(
|
router.post(
|
||||||
'/',
|
'/', [
|
||||||
[
|
check('username').isLength({ min: 1 }),
|
||||||
check('username').isLength({min: 1}),
|
|
||||||
check('domain').isIn(config.email.domains)
|
check('domain').isIn(config.email.domains)
|
||||||
],
|
],
|
||||||
(req, res) => {
|
(req, res) => {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
|
||||||
<div style="float: right; text-align: end;">
|
<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>
|
||||||
<div id="login">
|
<div id="login">
|
||||||
<h1>Welcome!</h1>
|
<h1>Welcome!</h1>
|
||||||
|
|
|
||||||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "48hr.email",
|
"name": "48hr.email",
|
||||||
"version": "1.5.4",
|
"version": "1.6.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "48hr.email",
|
"name": "48hr.email",
|
||||||
"version": "1.5.4",
|
"version": "1.6.1",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"array.prototype.flatmap": "^1.3.2",
|
"array.prototype.flatmap": "^1.3.2",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue