AcadeDoc/apps/server/src
Corentin 9139fb8728 fix(acadenice): pass content object directly to jsonb param + remove empty text nodes — Patch 028
Two bugs in template seed/instantiate:

1. ${JSON.stringify(content)}::jsonb made Postgres store the content as
   a jsonb scalar string (jsonb_typeof = 'string'), not an object. The
   instantiate read it back as a JSON-encoded string, which ProseMirror
   tried to parse as a node tree and crashed with 'Unknown node type:
   undefined' on the outer string. Pass the object directly with
   ${content as unknown as string}::jsonb so postgres-js binds it as
   a JSONB value.

2. Built-in template seed used { type: 'paragraph', content: [{ type:
   'text', text: '' }] } for empty paragraphs / list items / task
   items. ProseMirror schema rejects empty text nodes ('Empty text
   nodes are not allowed'). Replaced with content: [].

Verified via curl: POST /api/acadenice/templates/{id}/instantiate now
returns 201 with the new pageId/slugId.

Patch 028.
2026-05-08 13:01:10 +02:00
..
collaboration feat(acadenice): add sync blocks for cross-page content sharing — R4.2 2026-05-08 11:40:12 +02:00
common feat(ee): PDF import (#2142) 2026-05-01 14:56:39 +01:00
core fix(acadenice): pass content object directly to jsonb param + remove empty text nodes — Patch 028 2026-05-08 13:01:10 +02:00
database feat(acadedoc): replace EE Settings with open source UI (audit log, API keys, OIDC status) — R4.5 2026-05-08 12:24:00 +02:00
ee@35c0f3c4f8 update react-email (#2149) 2026-05-04 22:26:53 +01:00
integrations refactor(acadedoc): move branding from .env to UI-only — Patch 020 2026-05-08 11:49:49 +02:00
ws clean up ws 2026-03-26 13:59:17 +00:00
app.controller.ts switch to nx monorepo 2024-01-09 18:58:26 +01:00
app.module.ts feat: ratelimits (#2073) 2026-03-30 15:38:44 +01:00
app.service.ts switch to nx monorepo 2024-01-09 18:58:26 +01:00
main.ts feat(ee): SCIM (#1347) 2026-05-01 14:53:30 +01:00