fix: use express.Router() not require() in ESM patch

The blogroll index.js is an ES module so require() is not defined.
Replace `const { Router } = require("express")` with `express.Router()`
which is already in scope from the module's own top-level import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Sven
2026-03-13 19:20:53 +01:00
parent 4cde4a28ba
commit 3979e12e8b

View File

@@ -43,8 +43,7 @@ const patchSpecs = [
// with a response-shape transformer so the /news static page works.
// The /news page expects: item.link (not .url), item.feedId (not .blog.id),
// item.sourceUrl (not .blog.siteUrl), and feedsRes.feeds (not .items).
const { Router } = require("express");
const rssapiRouter = Router();
const rssapiRouter = express.Router();
rssapiRouter.use((req, res, next) => {
const originalJson = res.json.bind(res);
res.json = function (data) {