Skip to content

Commit

Permalink
fix: Fix deleting tags broken due to wrong column name
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed Sep 15, 2024
1 parent 064d5f8 commit fb63f55
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/trpc/routers/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fb63f55

Please sign in to comment.