fix: MEDIUM — Cache-Control headers on admin GETs, Open Day past date validation

- Add Cache-Control headers to admin GET endpoints (sections 60s, team 60s, bookings 30s, unread 15s, open-day 60s)
- Validate Open Day date is not in the past on both create (POST) and update (PUT)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-19 14:19:39 +03:00
parent b1adbbfe3d
commit 5cd23473c8
5 changed files with 26 additions and 5 deletions

View File

@@ -5,7 +5,9 @@ import type { RichListItem, VictoryItem } from "@/types/content";
export async function GET() {
const members = getTeamMembers();
return NextResponse.json(members);
return NextResponse.json(members, {
headers: { "Cache-Control": "private, max-age=60" },
});
}
export async function POST(request: NextRequest) {