diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-11-17 01:42:43 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-11-17 01:42:43 +0000 |
| commit | 815e1961701e13c933c3975c6026c60d1ded3cdf (patch) | |
| tree | b88921d5cc37720fb3a3c1654417fce3fa0f6f02 /packages/trpc/models/bookmarks.ts | |
| parent | 88c73e212c4510ce41ad8c6557fa7d5c8f72d199 (diff) | |
| download | karakeep-815e1961701e13c933c3975c6026c60d1ded3cdf.tar.zst | |
refactor: remove the PrivacyAware interface
Diffstat (limited to 'packages/trpc/models/bookmarks.ts')
| -rw-r--r-- | packages/trpc/models/bookmarks.ts | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/packages/trpc/models/bookmarks.ts b/packages/trpc/models/bookmarks.ts index e4bfdab2..bd696ee8 100644 --- a/packages/trpc/models/bookmarks.ts +++ b/packages/trpc/models/bookmarks.ts @@ -57,7 +57,6 @@ import { htmlToPlainText } from "@karakeep/shared/utils/htmlUtils"; import { AuthedContext } from ".."; import { mapDBAssetTypeToUserType } from "../lib/attachments"; import { List } from "./lists"; -import { PrivacyAware } from "./privacy"; async function dummyDrizzleReturnType() { const x = await DONT_USE_db.query.bookmarks.findFirst({ @@ -83,7 +82,7 @@ type BookmarkQueryReturnType = Awaited< ReturnType<typeof dummyDrizzleReturnType> >; -export class BareBookmark implements PrivacyAware { +export class BareBookmark { protected constructor( protected ctx: AuthedContext, private bareBookmark: ZBareBookmark, @@ -138,15 +137,6 @@ export class BareBookmark implements PrivacyAware { }); } } - - ensureCanAccess(ctx: AuthedContext): void { - if (this.bareBookmark.userId != ctx.user.id) { - throw new TRPCError({ - code: "FORBIDDEN", - message: "User is not allowed to access resource", - }); - } - } } export class Bookmark extends BareBookmark { |
