yayyy not testing commits
This commit is contained in:
parent
bc75e3f24c
commit
7d1882895b
1 changed files with 12 additions and 10 deletions
|
@ -50,19 +50,21 @@ app.post('/account/create', [
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const restrictions = config.restrictions.signup;
|
if (config.restrictions) {
|
||||||
if (restrictions && restrictions.specialCode) {
|
const restrictions = config.restrictions.signup;
|
||||||
const passedSpecialCode = req.body.specialCode;
|
if (restrictions && restrictions.specialCode) {
|
||||||
const specialCode = restrictions.specialCode;
|
const passedSpecialCode = req.body.specialCode;
|
||||||
|
const specialCode = restrictions.specialCode;
|
||||||
if (passedSpecialCode && specialCode) {
|
|
||||||
if (specialCode !== passedSpecialCode) {
|
if (passedSpecialCode && specialCode) {
|
||||||
|
if (specialCode !== passedSpecialCode) {
|
||||||
|
res.status(401).json({ error: true, message: 'ERROR_REQUEST_SPECIAL_CODE_MISSING', errors: [{ msg: 'No specialCode passed', param: 'specialCode', location: 'body' }] });
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
res.status(401).json({ error: true, message: 'ERROR_REQUEST_SPECIAL_CODE_MISSING', errors: [{ msg: 'No specialCode passed', param: 'specialCode', location: 'body' }] });
|
res.status(401).json({ error: true, message: 'ERROR_REQUEST_SPECIAL_CODE_MISSING', errors: [{ msg: 'No specialCode passed', param: 'specialCode', location: 'body' }] });
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
res.status(401).json({ error: true, message: 'ERROR_REQUEST_SPECIAL_CODE_MISSING', errors: [{ msg: 'No specialCode passed', param: 'specialCode', location: 'body' }] });
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue