feat: get author on series

This commit is contained in:
2023-08-10 19:16:03 +02:00
parent 9058e192ba
commit d8f7ac38f1
6 changed files with 35 additions and 11 deletions

View File

@ -56,6 +56,8 @@ export function createDocument(
log.info("creating document", { name });
typesense.synchronize();
return fetch(SILVERBULLET_SERVER + "/" + name, {
body: content,
method: "PUT",
@ -73,6 +75,8 @@ export async function getDocument(name: string): Promise<string> {
cache.setDocument(name, text);
typesense.synchronize();
return text;
}

View File

@ -100,3 +100,7 @@ const resourcePrefixes = Object.values(resources).map((v) => v.prefix).filter(
);
export const isLocalImage = (src: string) =>
resourcePrefixes.some((p) => src.startsWith(p));
export const isString = (input: string | undefined): input is string => {
return typeof input === "string";
};