Allow setting createdAt, emoji properties through documents.create (#5864)

This commit is contained in:
Tom Moor
2023-09-21 22:37:27 -04:00
committed by GitHub
parent 8833e578f1
commit 76862b626b
4 changed files with 60 additions and 11 deletions

View File

@@ -1289,14 +1289,16 @@ router.post(
transaction(),
async (ctx: APIContext<T.DocumentsCreateReq>) => {
const {
title = "",
text = "",
title,
text,
emoji,
publish,
collectionId,
parentDocumentId,
fullWidth,
templateId,
template,
createdAt,
} = ctx.input.body;
const editorVersion = ctx.headers["x-editor-version"] as string | undefined;
@@ -1343,6 +1345,8 @@ router.post(
const document = await documentCreator({
title,
text,
emoji,
createdAt,
publish,
collectionId,
parentDocumentId,