refactor: remove explicit any across admin forms and catalog actions
Local Build and Deploy / deploy (push) Canceled after 40s
Local Build and Deploy / deploy (push) Canceled after 40s
- Type resolveAsChild generically over Base UI render-prop type - Type catalog/rooms/catalog-items Prisma updates with Prisma.*UpdateInput - Type EventForm/PollForm with explicit form-value interfaces - Type EventPrizesManager/PollQuestionsManager with validator input types - All typecheck, lint, and 312 tests pass
This commit is contained in:
1 parent
907a4399d0
commit
3eaffe658d
8 files changed
+61
-23
No files matched your search
@@ -1,6 +1,7 @@
|
||||
"use server";
|
||||
|
||||
import { revalidatePath } from "next/cache";
|
||||
import type { Prisma } from "@/generated/prisma/client";
|
||||
import { requirePermission } from "@/lib/admin/guard";
|
||||
import { PERMS } from "@/lib/permissions";
|
||||
import { prisma } from "@/lib/prisma";
|
||||
@@ -55,7 +56,10 @@ export async function updateBcPage({
|
||||
if (Object.keys(data).length === 0) {
|
||||
return { ok: false as const, error: "No valid fields to update" };
|
||||
}
|
||||
await prisma.catalogPagesBc.update({ where: { id }, data: data as any });
|
||||
await prisma.catalogPagesBc.update({
|
||||
where: { id },
|
||||
data: data as Prisma.CatalogPagesBcUpdateInput,
|
||||
});
|
||||
await rcon.updateCatalog();
|
||||
await logStaffActivity({
|
||||
staffId: staff.id,
|
||||
@@ -98,7 +102,10 @@ export async function updateBcItem({
|
||||
if (Object.keys(safe).length === 0) {
|
||||
return { ok: false as const, error: "No valid fields to update" };
|
||||
}
|
||||
await prisma.catalogItemsBc.update({ where: { id }, data: safe as any });
|
||||
await prisma.catalogItemsBc.update({
|
||||
where: { id },
|
||||
data: safe as Prisma.CatalogItemsBcUpdateInput,
|
||||
});
|
||||
await rcon.updateCatalog();
|
||||
await logStaffActivity({
|
||||
staffId: staff.id,
|
||||
|
||||
Reference in new issue
Block a user