Multi step registration

This commit is contained in:
Chocobozzz
2019-05-29 11:03:01 +02:00
parent e590b4a512
commit 1d5342abc4
19 changed files with 502 additions and 93 deletions

View File

@@ -70,6 +70,12 @@ const usersRegisterValidator = [
.end()
}
if (body.channel.name === body.username) {
return res.status(400)
.send({ error: 'Channel name cannot be the same than user username.' })
.end()
}
const existing = await ActorModel.loadLocalByName(body.channel.name)
if (existing) {
return res.status(409)