From 9b7f9c14e6049ff8fc7c9ace20a6e77c42b7f7fb Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Thu, 29 Feb 2024 22:49:31 +0000
Subject: fix: Fix browser bookmarking input schema

---
 packages/browser-extension/src/SavePage.tsx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'packages/browser-extension/src/SavePage.tsx')

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,
+              },
             }),
           },
         );
-- 
cgit v1.2.3-70-g09d2

