diff --git a/api/v1/users.js b/api/v1/users.js index d631244..3a9fa5c 100755 --- a/api/v1/users.js +++ b/api/v1/users.js @@ -23,10 +23,12 @@ const createAccountLimiter = rateLimit({ }); app.get('/account/create/info', async (req, res) => { - const restrictions = config.restrictions.signup; let requiresCode = false; - if (restrictions && restrictions.specialCode) { - requiresCode = true; + if (config.restrictions) { + const restrictions = config.restrictions.signup; + if (restrictions && restrictions.specialCode) { + requiresCode = true; + } } res.json({