diff --git a/lib/crud.ts b/lib/crud.ts index d75ffb8..bcf7971 100644 --- a/lib/crud.ts +++ b/lib/crud.ts @@ -49,6 +49,7 @@ export function createCrud( async function read(id: string) { const path = pathFromId(id); const content = await getDocument(path); + const res = parse(content, id); if (hasThumbnails) { diff --git a/lib/documents.ts b/lib/documents.ts index 03e8958..43dd7fd 100644 --- a/lib/documents.ts +++ b/lib/documents.ts @@ -71,7 +71,9 @@ export async function getDocument(name: string): Promise { if (cachedDocument) return cachedDocument; log.debug("fetching document", { name }); - const response = await fetch(SILVERBULLET_SERVER + "/" + name); + const headers = new Headers(); + headers.append("X-Sync-Mode", "true"); + const response = await fetch(SILVERBULLET_SERVER + "/" + name, { headers }); const text = await response.text(); cache.setDocument(name, text);