fix: remove express.json() inline middleware (type-only import)
This commit is contained in:
parent
0dd15d3541
commit
ba9a143385
1 changed files with 2 additions and 2 deletions
|
|
@ -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" });
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue