tickets API: allow insurance_lead + business_closeout + truck_sale categories

These lead-capture categories were posted by the DOT checker but missing from
VALID_CATEGORIES, so the API rejected them with 400 (insurance_lead too — it
was referenced in the Telegram code but never allowlisted).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
justin 2026-05-31 00:49:18 -05:00
parent 5f3a9dc54f
commit 0409167e5a

View file

@ -5,7 +5,10 @@ import { createIssue } from "../erpnext-client.js";
const router = Router();
const VALID_CATEGORIES = ["question", "support", "issue", "service_request", "quote"] as const;
const VALID_CATEGORIES = [
"question", "support", "issue", "service_request", "quote",
"insurance_lead", "business_closeout", "truck_sale_quickcash", "truck_sale_marketplace",
] as const;
// POST /api/v1/tickets
router.post("/api/v1/tickets", submitLimiter, async (req, res) => {