Files
twotalesanimation 81ad7e4ea9 Initial commit
2026-06-11 10:46:09 +02:00

9 lines
285 B
TypeScript

// app/api/users/route.ts
import { NextResponse } from "next/server";
import { prisma } from "../../../lib/prisma";
export async function GET() {
const courses = await prisma.course.findMany({ select: { id: true, title: true, code: true } });
return NextResponse.json(courses);
}