fix: Correct urlId format for documents (10 chars)

Outline uses 10-char alphanumeric urlId, not 21-char hex.
Documents with wrong format returned 404 "Not found".

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-31 20:40:47 +00:00
parent 12710c2b2f
commit f1df797ac4
9 changed files with 19 additions and 10 deletions

View File

@@ -248,7 +248,7 @@ const createDocument: BaseTool<CreateDocumentArgs> = {
)
VALUES (
gen_random_uuid(),
substring(replace(gen_random_uuid()::text, '-', '') from 1 for 21),
substring(md5(random()::text) from 1 for 10),
$1, $2, $3, $4, $5, $6, $7, $8, $9, NOW(), NOW(), 1, false, false, false
)
RETURNING id, "urlId", title, "collectionId", "publishedAt", "createdAt"