From 4481e0e09f5faf6380084125b075acefabb1efb6 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Thu, 29 Feb 2024 22:49:31 +0000 Subject: [PATCH] fix: Fix browser bookmarking input schema --- packages/browser-extension/src/SavePage.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/browser-extension/src/SavePage.tsx b/packages/browser-extension/src/SavePage.tsx index e202aea5..2de19def 100644 --- a/packages/browser-extension/src/SavePage.tsx +++ b/packages/browser-extension/src/SavePage.tsx @@ -22,7 +22,7 @@ export default function SavePage({ settings }: { settings: Settings }) { try { const resp = await fetch( - `${settings.address}/api/trpc/bookmarks.bookmarkLink`, + `${settings.address}/api/trpc/bookmarks.createBookmark`, { method: "POST", headers: { @@ -30,8 +30,10 @@ export default function SavePage({ settings }: { settings: Settings }) { "Content-Type": "application/json", }, body: JSON.stringify({ - type: "link", - url: currentUrl, + json: { + type: "link", + url: currentUrl, + }, }), }, );