aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/shared-react/hooks/bookmarks.ts15
-rw-r--r--packages/trpc/routers/bookmarks.ts3
2 files changed, 2 insertions, 16 deletions
diff --git a/packages/shared-react/hooks/bookmarks.ts b/packages/shared-react/hooks/bookmarks.ts
index 7339f6c2..e06c7841 100644
--- a/packages/shared-react/hooks/bookmarks.ts
+++ b/packages/shared-react/hooks/bookmarks.ts
@@ -84,21 +84,6 @@ export function useUpdateBookmark(
});
}
-export function useUpdateBookmarkText(
- ...opts: Parameters<typeof api.bookmarks.updateBookmarkText.useMutation>
-) {
- const apiUtils = api.useUtils();
- return api.bookmarks.updateBookmarkText.useMutation({
- ...opts[0],
- onSuccess: (res, req, meta) => {
- apiUtils.bookmarks.getBookmarks.invalidate();
- apiUtils.bookmarks.searchBookmarks.invalidate();
- apiUtils.bookmarks.getBookmark.invalidate({ bookmarkId: req.bookmarkId });
- return opts[0]?.onSuccess?.(res, req, meta);
- },
- });
-}
-
export function useSummarizeBookmark(
...opts: Parameters<typeof api.bookmarks.summarizeBookmark.useMutation>
) {
diff --git a/packages/trpc/routers/bookmarks.ts b/packages/trpc/routers/bookmarks.ts
index 9219adc6..5e6df4a5 100644
--- a/packages/trpc/routers/bookmarks.ts
+++ b/packages/trpc/routers/bookmarks.ts
@@ -473,7 +473,7 @@ export const bookmarksAppRouter = router({
.set({
text: input.text,
})
- .where(eq(bookmarkLinks.id, input.bookmarkId));
+ .where(eq(bookmarkTexts.id, input.bookmarkId));
if (result.changes == 0) {
throw new TRPCError({
@@ -539,6 +539,7 @@ export const bookmarksAppRouter = router({
return updatedBookmark;
}),
+ // DEPRECATED: use updateBookmark instead
updateBookmarkText: authedProcedure
.input(
z.object({