Add support for SUBDOMAINS_ENABLED=false

This commit is contained in:
Tom Moor
2018-11-11 22:06:50 -08:00
parent 61138ff4fa
commit b3a8d34af3
6 changed files with 46 additions and 22 deletions

View File

@ -19,7 +19,7 @@ router.post('team.update', auth(), async ctx => {
const team = await Team.findById(user.teamId);
authorize(user, 'update', team);
if (process.env.SUBDOMAINS_ENABLED) {
if (process.env.SUBDOMAINS_ENABLED === 'true') {
team.subdomain = subdomain === '' ? null : subdomain;
}