diff options
| author | MohamedBassem <me@mbassem.com> | 2024-09-15 01:17:32 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-09-15 14:30:56 +0000 |
| commit | fb63f55e9d86c5533c8455497c7b154a18546b39 (patch) | |
| tree | 62d3fad991ecee7370495eedd47984f13484344e /packages/trpc/routers | |
| parent | 064d5f8b4d74508d2b045389ae3393a2742b5286 (diff) | |
| download | karakeep-fb63f55e9d86c5533c8455497c7b154a18546b39.tar.zst | |
fix: Fix deleting tags broken due to wrong column name
Diffstat (limited to 'packages/trpc/routers')
| -rw-r--r-- | packages/trpc/routers/tags.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/trpc/routers/tags.ts b/packages/trpc/routers/tags.ts index e76a09ec..a5d93213 100644 --- a/packages/trpc/routers/tags.ts +++ b/packages/trpc/routers/tags.ts @@ -107,7 +107,13 @@ export const tagsAppRouter = router({ bookmarkId: tagsOnBookmarks.bookmarkId, }) .from(tagsOnBookmarks) - .where(conditionFromInput(input, ctx.user.id)); + .where( + and( + eq(tagsOnBookmarks.tagId, input.tagId), + // Tag ownership is checked in the ensureTagOwnership middleware + // eq(bookmarkTags.userId, ctx.user.id), + ), + ); const res = await ctx.db .delete(bookmarkTags) |
