diff --git a/src/pages/api/user/recent.ts b/src/pages/api/user/recent.ts index 26187f3..149d4c2 100644 --- a/src/pages/api/user/recent.ts +++ b/src/pages/api/user/recent.ts @@ -11,6 +11,9 @@ async function handler(req: NextApiReq, res: NextApiRes) { let images = await prisma.image.findMany({ take, + where: { + userId: user.id, + }, orderBy: { created_at: 'desc' },