- Create about page with game modes, technologies, and paliers - Add stats API endpoint for global game counter - Update home screen with emoji-based tier system (🌱-🚀) - Rewrite BlitzScreen to match new puzzle-based win/lose phases - Add simple-icons package for tech stack icons - Update metadata with wikirush.xyz domain - Fix em dashes to hyphens throughout codebase - Update footer with privacy and about links
18 lines
469 B
TypeScript
18 lines
469 B
TypeScript
import { NextResponse } from "next/server";
|
|
import { prisma } from "../../../lib/prisma";
|
|
|
|
export const revalidate = 60; // revalide toutes les 60s
|
|
|
|
export async function GET() {
|
|
const todayStart = new Date();
|
|
todayStart.setHours(0, 0, 0, 0);
|
|
|
|
const todayCount = await prisma.game.count({
|
|
where: { playedAt: { gte: todayStart } },
|
|
});
|
|
|
|
const totalCount = await prisma.game.count();
|
|
|
|
return NextResponse.json({ today: todayCount, total: totalCount });
|
|
}
|