aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc/models/webhooks.ts
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-11-17 01:42:43 +0000
committerMohamed Bassem <me@mbassem.com>2025-11-17 01:42:43 +0000
commit815e1961701e13c933c3975c6026c60d1ded3cdf (patch)
treeb88921d5cc37720fb3a3c1654417fce3fa0f6f02 /packages/trpc/models/webhooks.ts
parent88c73e212c4510ce41ad8c6557fa7d5c8f72d199 (diff)
downloadkarakeep-815e1961701e13c933c3975c6026c60d1ded3cdf.tar.zst
refactor: remove the PrivacyAware interface
Diffstat (limited to 'packages/trpc/models/webhooks.ts')
-rw-r--r--packages/trpc/models/webhooks.ts12
1 files changed, 1 insertions, 11 deletions
diff --git a/packages/trpc/models/webhooks.ts b/packages/trpc/models/webhooks.ts
index 3a8c7bab..d2d9c19c 100644
--- a/packages/trpc/models/webhooks.ts
+++ b/packages/trpc/models/webhooks.ts
@@ -10,9 +10,8 @@ import {
} from "@karakeep/shared/types/webhooks";
import { AuthedContext } from "..";
-import { PrivacyAware } from "./privacy";
-export class Webhook implements PrivacyAware {
+export class Webhook {
constructor(
protected ctx: AuthedContext,
public webhook: typeof webhooksTable.$inferSelect,
@@ -66,15 +65,6 @@ export class Webhook implements PrivacyAware {
return webhooks.map((w) => new Webhook(ctx, w));
}
- ensureCanAccess(ctx: AuthedContext): void {
- if (this.webhook.userId !== ctx.user.id) {
- throw new TRPCError({
- code: "FORBIDDEN",
- message: "User is not allowed to access resource",
- });
- }
- }
-
async delete(): Promise<void> {
const res = await this.ctx.db
.delete(webhooksTable)