Allow removing subdomain

This commit is contained in:
Tom Moor
2018-11-03 23:24:44 -07:00
parent 1be8e13828
commit 8de074b275
3 changed files with 5 additions and 5 deletions

View File

@ -19,8 +19,8 @@ router.post('team.update', auth(), async ctx => {
const team = await Team.findById(user.teamId);
authorize(user, 'update', team);
team.subdomain = subdomain === '' ? null : subdomain;
if (name) team.name = name;
if (subdomain !== undefined) team.subdomain = subdomain;
if (sharing !== undefined) team.sharing = sharing;
if (avatarUrl && avatarUrl.startsWith(`${endpoint}/uploads/${user.id}`)) {
team.avatarUrl = avatarUrl;