fix: some shit

This commit is contained in:
max_richter 2023-08-19 23:29:39 +02:00
parent 09fea14644
commit aeb067aadb
2 changed files with 4 additions and 1 deletions

View File

@ -49,6 +49,7 @@ export function createCrud<T>(
async function read(id: string) {
const path = pathFromId(id);
const content = await getDocument(path);
const res = parse(content, id);
if (hasThumbnails) {

View File

@ -71,7 +71,9 @@ export async function getDocument(name: string): Promise<string> {
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);