Initial commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// 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);
|
||||
}
|
||||
Reference in New Issue
Block a user