forked from hippoz/brainlet
fix error when special code is missing
This commit is contained in:
parent
da3962b9f1
commit
a5d021972b
1 changed files with 5 additions and 3 deletions
|
@ -23,10 +23,12 @@ const createAccountLimiter = rateLimit({
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/account/create/info', async (req, res) => {
|
app.get('/account/create/info', async (req, res) => {
|
||||||
const restrictions = config.restrictions.signup;
|
|
||||||
let requiresCode = false;
|
let requiresCode = false;
|
||||||
if (restrictions && restrictions.specialCode) {
|
if (config.restrictions) {
|
||||||
requiresCode = true;
|
const restrictions = config.restrictions.signup;
|
||||||
|
if (restrictions && restrictions.specialCode) {
|
||||||
|
requiresCode = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
res.json({
|
res.json({
|
||||||
|
|
Loading…
Reference in a new issue