fix: remove express.json() inline middleware (type-only import)

This commit is contained in:
gitadmin 2026-05-02 14:51:42 +00:00
parent 0dd15d3541
commit ba9a143385

View file

@ -1227,7 +1227,7 @@ export function registerStewardRoutes(app: Express) {
});
// ── PATCH /api/steward/:slug/catalog-sources/:id ─────────────────────────
app.patch("/api/steward/:slug/catalog-sources/:id", express.json({ limit: "1mb" }), async (req: Request, res: Response) => {
app.patch("/api/steward/:slug/catalog-sources/:id", async (req: Request, res: Response) => {
const { slug, id } = req.params;
const { token, action } = req.body;
if (!await validateStewardToken(slug, token)) return res.status(403).json({ error: "Invalid token" });
@ -1250,7 +1250,7 @@ export function registerStewardRoutes(app: Express) {
});
// ── POST /api/steward/:slug/discover ─────────────────────────────────────
app.post("/api/steward/:slug/discover", express.json({ limit: "1mb" }), async (req: Request, res: Response) => {
app.post("/api/steward/:slug/discover", async (req: Request, res: Response) => {
const { slug } = req.params;
const { token, query } = req.body;
if (!await validateStewardToken(slug, token)) return res.status(403).json({ error: "Invalid token" });