import type { FastifyInstance } from "fastify"; import { prisma } from "../lib/prisma.js"; export async function systemsRoutes(app: FastifyInstance) { app.get("/api/systems", async () => { return prisma.anatomicalSystem.findMany({ orderBy: { order: "asc" }, include: { _count: { select: { structures: true } } }, }); }); }