diff options
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 { |
