Files
WikiRush/app/api/stats/route.ts
T
jessy-david-dev 47b8de0b67 feat: add about page, global stats counter, and blitz screen updates
- 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
2026-04-10 22:26:24 +02:00

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 });
}