Files
anatomia/backend/src/routes/systems.ts
T

12 lines
348 B
TypeScript

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 } } },
});
});
}