v1.13.0: Reset Password
This commit is contained in:
parent
10c585d230
commit
22ebde8a0b
7 changed files with 134 additions and 11 deletions
|
@ -5,11 +5,11 @@ module.exports = (db) => {
|
|||
const router = express.Router();
|
||||
|
||||
router.get('/:code', async (req, res) => {
|
||||
const { doc } = (await db.allDocs({ include_docs: true }))
|
||||
const row = (await db.allDocs({ include_docs: true }))
|
||||
.rows
|
||||
.find(({ doc }) => doc.signupToken === req.params.code)
|
||||
|
||||
res.render('confirm-account', { doc })
|
||||
res.render('confirm-account', { doc: row ? row.doc : undefined })
|
||||
});
|
||||
|
||||
router.post('/:code', async (req, res) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue