diff --git a/src/controllers/PrinterController.ts b/src/controllers/PrinterController.ts index 8ef9b6d..5d1f439 100644 --- a/src/controllers/PrinterController.ts +++ b/src/controllers/PrinterController.ts @@ -13,7 +13,13 @@ class PrinterController { if (!campus) { const printers = await prisma.printer.findMany({ - include: { network: true } + include: { + network: true, + status: { + orderBy: { timestamp: 'desc' }, + take: 1 + } + } }) return res.json(printers) }