fix: Various fixes for collaborative editing beta (#2586)

This commit is contained in:
Tom Moor
2021-09-15 23:27:22 -07:00
committed by GitHub
parent cde2909296
commit 27736f66ef
7 changed files with 30 additions and 16 deletions

View File

@ -17,6 +17,7 @@ router.post("team.update", auth(), async (ctx) => {
sharing,
guestSignin,
documentEmbeds,
collaborativeEditing,
} = ctx.body;
const user = ctx.state.user;
const team = await Team.findByPk(user.teamId);
@ -31,6 +32,9 @@ router.post("team.update", auth(), async (ctx) => {
if (documentEmbeds !== undefined) team.documentEmbeds = documentEmbeds;
if (guestSignin !== undefined) team.guestSignin = guestSignin;
if (avatarUrl !== undefined) team.avatarUrl = avatarUrl;
if (collaborativeEditing !== undefined) {
team.collaborativeEditing = collaborativeEditing;
}
const changes = team.changed();
const data = {};