diff options
Diffstat (limited to 'packages/trpc/models/webhooks.ts')
| -rw-r--r-- | packages/trpc/models/webhooks.ts | 12 |
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) |
