mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
do not set recover_code during user registration
This commit is contained in:
parent
176de89747
commit
80e9d8a11e
1 changed files with 1 additions and 2 deletions
|
@ -80,7 +80,6 @@ const userController = {
|
|||
if (!settingsController.settings.allow_registration) { return res.sendStatus(404) }
|
||||
const n_users = await User.count()
|
||||
try {
|
||||
req.body.recover_code = crypto.randomBytes(16).toString('hex')
|
||||
|
||||
// the first registered user will be an active admin
|
||||
if (n_users === 0) {
|
||||
|
@ -104,7 +103,7 @@ const userController = {
|
|||
res.sendStatus(200)
|
||||
} catch (e) {
|
||||
log.error('Registration error:', e)
|
||||
res.status(404).json(e)
|
||||
res.status(400).json(e)
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue