feat: better layout in a lot of places
This commit is contained in:
@@ -25,7 +25,7 @@ export async function getDocuments(): Promise<Document[]> {
|
||||
|
||||
const headers = new Headers();
|
||||
headers.append("Accept", "application/json");
|
||||
|
||||
console.log("[documents] fetching all documents");
|
||||
const response = await fetch(`${SILVERBULLET_SERVER}/index.json`, {
|
||||
headers: headers,
|
||||
});
|
||||
@@ -47,6 +47,8 @@ export function createDocument(
|
||||
headers.append("Content-Type", mediaType);
|
||||
}
|
||||
|
||||
console.log("[documents] creating document", { name });
|
||||
|
||||
return fetch(SILVERBULLET_SERVER + "/" + name, {
|
||||
body: content,
|
||||
method: "PUT",
|
||||
@@ -58,6 +60,7 @@ export async function getDocument(name: string): Promise<string> {
|
||||
const cachedDocument = await cache.getDocument(name);
|
||||
if (cachedDocument) return cachedDocument;
|
||||
|
||||
console.log("[documents] fetching document", { name });
|
||||
const response = await fetch(SILVERBULLET_SERVER + "/" + name);
|
||||
const text = await response.text();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user