Skip to content

Commit 3c12cd2

Browse files
aid-ninjaclaude
andcommitted
fix: resolve shadowing from eslint audit
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 4431e9d commit 3c12cd2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,23 +318,23 @@ const MIME = {
318318
// ── Body parser ───────────────────────────────────────────────────────────────
319319

320320
function readBody(req) {
321-
return new Promise((resolve, reject) => {
321+
return new Promise((res, reject) => {
322322
const chunks = [];
323323
let size = 0;
324324
req.on("data", (chunk) => {
325325
size += chunk.length;
326326
if (size > 1048576) {
327-
resolve(null);
327+
res(null);
328328
req.destroy();
329329
return;
330330
}
331331
chunks.push(chunk);
332332
});
333333
req.on("end", () => {
334334
try {
335-
resolve(JSON.parse(Buffer.concat(chunks).toString()));
335+
res(JSON.parse(Buffer.concat(chunks).toString()));
336336
} catch {
337-
resolve(null);
337+
res(null);
338338
}
339339
});
340340
req.on("error", reject);

0 commit comments

Comments
 (0)