fix(audit): UI — L18 (decorative emoji -> Lucide icons), L19 (gated NotesList timer + create-from-url ref-in-effect)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
||||
|
||||
import { withAuth, withPermission } from '@/lib/api/helpers';
|
||||
import { parseBody } from '@/lib/api/route-helpers';
|
||||
import { errorResponse } from '@/lib/errors';
|
||||
import { errorResponse, ValidationError } from '@/lib/errors';
|
||||
import { createReportTemplate, listReportTemplates } from '@/lib/services/report-templates.service';
|
||||
|
||||
const createBodySchema = z.object({
|
||||
@@ -66,10 +66,7 @@ export const POST = withAuth(
|
||||
// path at use time.
|
||||
const configKind = (body.config as { kind?: unknown }).kind;
|
||||
if (configKind !== body.kind) {
|
||||
return NextResponse.json(
|
||||
{ error: `config.kind must equal "${body.kind}"` },
|
||||
{ status: 400 },
|
||||
);
|
||||
throw new ValidationError(`config.kind must equal "${body.kind}"`);
|
||||
}
|
||||
const row = await createReportTemplate({
|
||||
portId: ctx.portId,
|
||||
|
||||
Reference in New Issue
Block a user