fix: Add collaboratorIds field to document creation

Outline requires collaboratorIds to be an array, not NULL.
Error was: "TypeError: b.collaboratorIds is not iterable"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-31 20:43:16 +00:00
parent f1df797ac4
commit 9598aba0bf
9 changed files with 19 additions and 11 deletions

View File

@@ -244,12 +244,12 @@ const createDocument: BaseTool<CreateDocumentArgs> = {
INSERT INTO documents (
id, "urlId", title, text, "collectionId", "teamId", "parentDocumentId", "createdById",
"lastModifiedById", template, "publishedAt", "createdAt", "updatedAt", version,
"isWelcome", "fullWidth", "insightsEnabled"
"isWelcome", "fullWidth", "insightsEnabled", "collaboratorIds"
)
VALUES (
gen_random_uuid(),
substring(md5(random()::text) from 1 for 10),
$1, $2, $3, $4, $5, $6, $7, $8, $9, NOW(), NOW(), 1, false, false, false
$1, $2, $3, $4, $5, $6, $7, $8, $9, NOW(), NOW(), 1, false, false, false, '{}'
)
RETURNING id, "urlId", title, "collectionId", "publishedAt", "createdAt"
`;