diff options
Diffstat (limited to 'packages/trpc/models/highlights.ts')
| -rw-r--r-- | packages/trpc/models/highlights.ts | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/packages/trpc/models/highlights.ts b/packages/trpc/models/highlights.ts index 260c4b8a..49791467 100644 --- a/packages/trpc/models/highlights.ts +++ b/packages/trpc/models/highlights.ts @@ -12,9 +12,8 @@ import { zCursorV2 } from "@karakeep/shared/types/pagination"; import { AuthedContext } from ".."; import { BareBookmark } from "./bookmarks"; -import { PrivacyAware } from "./privacy"; -export class Highlight implements PrivacyAware { +export class Highlight { constructor( protected ctx: AuthedContext, private highlight: typeof highlights.$inferSelect, @@ -115,15 +114,6 @@ export class Highlight implements PrivacyAware { }; } - ensureCanAccess(ctx: AuthedContext): void { - if (this.highlight.userId !== ctx.user.id) { - throw new TRPCError({ - code: "FORBIDDEN", - message: "User is not allowed to access resource", - }); - } - } - async delete(): Promise<z.infer<typeof zHighlightSchema>> { const result = await this.ctx.db .delete(highlights) |
