Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(staff): custom-prompts gate leaves staff audits out of the daily …
…count too

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • Loading branch information
razel-hash and claude committed Nov 10, 2026
commit 80f0de4c4f2598bf4c58721cde10028d670751aa
3 changes: 2 additions & 1 deletion src/app/api/audit/[auditId]/custom-prompts/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from '@/lib/auditor/ai-probe';
import { checkRateLimit, getClientIp } from '@/lib/rateLimit';
import { countTodaysAudits, reportAccess, runGate, unlockCookieName } from '@/lib/gate';
import { staffList } from '@/lib/staff';

export const runtime = 'nodejs';
export const dynamic = 'force-dynamic';
Expand Down Expand Up @@ -124,7 +125,7 @@ export async function POST(
}

// The run gate covers the first run too; before the limiter, so a refusal spends no budget.
const refused = await runGate(() => countTodaysAudits(supabase));
const refused = await runGate(() => countTodaysAudits(supabase, { publicOnly: staffList().length > 0 }));
if (refused) return NextResponse.json(refused.body, { status: refused.status });

try {
Expand Down
Loading