Skip to content
Snippets Groups Projects

Feature games list

Merged Yusuf Akgül requested to merge FeatureGamesList into main
12 files
+ 279
51
Compare changes
  • Side-by-side
  • Inline
Files
12
+ 4
3
import { getGames } from "@/lib/igdb";
import { getGames } from "@/lib/igdb";
import { NextRequest, NextResponse } from "next/server";
import { NextRequest, NextResponse } from "next/server";
export async function GET() {
export async function GET(req: NextRequest) {
const games = await getGames();
const p = req.nextUrl.searchParams;
 
const games = await getGames(p.get('page') ? parseInt(p.get('page') as string) : undefined);
return NextResponse.json(games);
return NextResponse.json(games);
}
}
 
\ No newline at end of file
Loading