summaryrefslogtreecommitdiff
path: root/misc/userscripts/add-nextcloud-bookmarks
diff options
context:
space:
mode:
Diffstat (limited to 'misc/userscripts/add-nextcloud-bookmarks')
-rwxr-xr-xmisc/userscripts/add-nextcloud-bookmarks6
1 files changed, 4 insertions, 2 deletions
diff --git a/misc/userscripts/add-nextcloud-bookmarks b/misc/userscripts/add-nextcloud-bookmarks
index 4e66620dc..5da887086 100755
--- a/misc/userscripts/add-nextcloud-bookmarks
+++ b/misc/userscripts/add-nextcloud-bookmarks
@@ -120,14 +120,16 @@ tags = settings["tags"].split(",")
QUTE_URL = environ["QUTE_URL"]
api_url = settings["host"] + "/index.php/apps/bookmarks/public/rest/v2/bookmark"
-headers = {"Content-Type": "application/json"}
auth = HTTPBasicAuth(settings["user"], settings["password"])
+headers = {"Content-Type": "application/json"}
+params = {"url": QUTE_URL}
# check if there is already a bookmark for the URL
r = get(
- "{}?url={}".format(api_url, QUTE_URL),
+ api_url,
auth=auth,
headers=headers,
+ params=params,
timeout=(3.05, 27),
)
if r.status_code != 200: