Tighten typing and input validation across study pages
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m2s

This commit is contained in:
Elijah 2026-07-13 06:55:17 -07:00
parent 6d1d918355
commit d6f3502cb1
16 changed files with 170 additions and 56 deletions

View file

@ -1,5 +1,6 @@
import { NextRequest, NextResponse } from "next/server";
import { prisma } from "@/lib/db";
import type { Prisma } from "@/generated/prisma/client";
export async function PATCH(
request: NextRequest,
@ -10,7 +11,7 @@ export async function PATCH(
const body = await request.json();
const { name, sortOrder } = body;
const updateData: any = {};
const updateData: Prisma.MaterialGroupUpdateInput = {};
if (name !== undefined) updateData.name = name;
if (sortOrder !== undefined) updateData.sortOrder = sortOrder;