refactor: update response structure for bugs endpoint to use 'data' key

This commit is contained in:
Thibault Pouch
2026-03-17 16:43:27 +01:00
parent 53740dc694
commit 2e42d67196

View File

@@ -100,7 +100,7 @@ router.get('/', async (req: Request, res: Response): Promise<void> => {
prisma.bugReport.count({ where }), prisma.bugReport.count({ where }),
]); ]);
res.json({ bugs: bugs.map(formatBug), total, page, pages: Math.ceil(total / limit) }); res.json({ data: bugs.map(formatBug), total, page, pages: Math.ceil(total / limit) });
}); });
// GET /api/bugs/:id // GET /api/bugs/:id