Files
spsays-training/app/api/books/route.ts
T
2026-05-10 00:35:14 +05:30

8 lines
190 B
TypeScript

import { NextResponse } from "next/server";
import { getAllBooks } from "@/lib/api";
export async function GET() {
const books = await getAllBooks();
return NextResponse.json(books);
}