feat: Return publicly shared document title in SSR HTML (#2191)

* feat: Return publicly shared document title in SSR HTML
closes #2146

* tests
This commit is contained in:
Tom Moor
2021-06-09 17:41:39 -07:00
committed by GitHub
parent 4cd61db1ea
commit a99f6bed42
4 changed files with 93 additions and 6 deletions

View File

@@ -26,6 +26,13 @@ export async function buildShare(overrides: Object = {}) {
const user = await buildUser({ teamId: overrides.teamId });
overrides.userId = user.id;
}
if (!overrides.documentId) {
const document = await buildDocument({
createdById: overrides.userId,
teamId: overrides.teamId,
});
overrides.documentId = document.id;
}
return Share.create({
published: true,