Skip to content

Commit 63d4627

Browse files
committed
fix(obsidian): issues with patch_content and complex_search
1 parent 3fdb9b3 commit 63d4627

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

servlets/obsidian/plugin/plugin.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from datetime import datetime # noqa: F401
33
import extism # noqa: F401 # pyright: ignore
44
from urllib.parse import urlencode
5+
import urllib.parse
6+
import json
57

68
from pdk_types import (
79
BlobResourceContents,
@@ -63,7 +65,7 @@ def search(self, query: str, context_length: int = 100):
6365
def append_content(self, path, content):
6466
return self.post(f"/vault/{path}", content, {'Content-Type': 'text/markdown'})
6567

66-
def patch_content(filepath, operation, target_type, target, content):
68+
def patch_content(self, path, operation, target_type, target, content):
6769
headers = {
6870
'Content-Type': 'text/markdown',
6971
'Operation': operation,
@@ -76,7 +78,6 @@ def complex_search(self, query):
7678
headers = {
7779
'Content-Type': 'application/vnd.olrapi.jsonlogic+json',
7880
}
79-
query_string = urlencode(params)
8081
return self.post(f"/search/", json.dumps(query), headers)
8182

8283
def errorReturn(message):

0 commit comments

Comments
 (0)