fix: some shit
This commit is contained in:
parent
09fea14644
commit
aeb067aadb
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user