refactor(feed): use PrismaClient type directly in assertPetOwnership

This commit is contained in:
admin committed 2026-06-13 10:02:17 +02:00
1 parent f7b09902f3
commit fa9b33ad7e
1 file changed
+2 -1
+2 -1
View File
@@ -4,13 +4,14 @@ import { TRPCError } from "@trpc/server";
import { router, protectedProcedure } from "@/trpc/init";
import { redis } from "@/lib/redis";
import { getFeedPage } from "@/lib/feed-helpers";
import type { PrismaClient } from "@prisma/client";
/**
* Ownership assertion: verifies petId belongs to ctx.userId.
* Security (T-02-20): prevents feed spoofing via fabricated petId.
*/
async function assertPetOwnership(
prisma: Parameters<typeof feedRouter.createCaller>[0]["prisma"],
prisma: PrismaClient,
petId: string,
userId: string
) {