feat: add WebDAV journal storage support

This commit is contained in:
vorotamoroz
2026-07-06 10:31:20 +00:00
parent 06bba49aad
commit 339a4bc9c1
23 changed files with 474 additions and 31 deletions
+5 -7
View File
@@ -147,14 +147,12 @@ export class ObsidianAPIService extends InjectableAPIService<ObsidianServiceCont
: req instanceof Request && typeof req.method === "string"
? req.method
: "GET";
if (typeof req !== "string") {
if (opts?.body) {
body = typeof opts.body === "string" ? opts.body : await new Response(opts.body).arrayBuffer();
} else if (req.body) {
body = await new Response(req.body).arrayBuffer();
}
if (opts?.body) {
body = typeof opts.body === "string" ? opts.body : await new Response(opts.body).arrayBuffer();
} else if (typeof req !== "string" && req.body) {
body = await new Response(req.body).arrayBuffer();
} else {
body = opts?.body as string;
body = undefined;
}
const reqHeaders = new Headers(req instanceof Request ? req.headers : {});