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/importSessions.ts | |
| parent | 88c73e212c4510ce41ad8c6557fa7d5c8f72d199 (diff) | |
| download | karakeep-815e1961701e13c933c3975c6026c60d1ded3cdf.tar.zst | |
refactor: remove the PrivacyAware interface
Diffstat (limited to 'packages/trpc/models/importSessions.ts')
| -rw-r--r-- | packages/trpc/models/importSessions.ts | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/packages/trpc/models/importSessions.ts b/packages/trpc/models/importSessions.ts index 270c2bce..56bcaf9a 100644 --- a/packages/trpc/models/importSessions.ts +++ b/packages/trpc/models/importSessions.ts @@ -15,9 +15,8 @@ import { } from "@karakeep/shared/types/importSessions"; import type { AuthedContext } from "../index"; -import { PrivacyAware } from "./privacy"; -export class ImportSession implements PrivacyAware { +export class ImportSession { protected constructor( protected ctx: AuthedContext, public session: ZImportSession, @@ -82,15 +81,6 @@ export class ImportSession implements PrivacyAware { ); } - ensureCanAccess(ctx: AuthedContext): void { - if (this.session.userId !== ctx.user.id) { - throw new TRPCError({ - code: "FORBIDDEN", - message: "User is not allowed to access this import session", - }); - } - } - async attachBookmark(bookmarkId: string): Promise<void> { await this.ctx.db.insert(importSessionBookmarks).values({ importSessionId: this.session.id, |
