refactor(feed): use PrismaClient type directly in assertPetOwnership
This commit is contained in:
1 parent
f7b09902f3
commit
fa9b33ad7e
1 file changed
+2
-1
@@ -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
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user