feat: implement club admin dashboard with activity feed and settings
Pull Request / unit-tests (pull_request) Successful in 57s
Pull Request / e2e-tests (pull_request) Successful in 3m10s
Pull Request / analyze-bump-type (pull_request) Successful in 12s

This commit is contained in:
2026-04-26 17:17:52 -07:00
parent 2658dc07cb
commit 31fc26478d
12 changed files with 686 additions and 3 deletions
+17 -3
View File
@@ -1,4 +1,4 @@
import { NextResponse } from "next/server";
import { NextRequest, NextResponse } from "next/server";
import { prisma } from "@/lib/prisma";
/**
@@ -6,10 +6,22 @@ import { prisma } from "@/lib/prisma";
*
* Get all players with their user associations
* This is a public endpoint (no authentication required)
* Supports search query parameter
*/
export async function GET() {
export async function GET(request: NextRequest) {
try {
const { searchParams } = new URL(request.url)
const search = searchParams.get('search') || ''
const limit = parseInt(searchParams.get('limit') || '50')
const offset = parseInt(searchParams.get('offset') || '0')
const where: any = {}
if (search) {
where.name = { contains: search, mode: 'insensitive' }
}
const players = await prisma.player.findMany({
where,
include: {
user: {
select: {
@@ -17,7 +29,9 @@ export async function GET() {
},
},
},
orderBy: { name: "asc" },
orderBy: { currentElo: 'desc' },
take: limit,
skip: offset,
});
return NextResponse.json(players);