From 23a1a8937533f273bd269649d0ba13ce8e3b6051 Mon Sep 17 00:00:00 2001 From: libangyao Date: Thu, 25 Feb 2021 19:23:10 +0800 Subject: [PATCH] fix: req->res #11 --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index fad9af2..273ddfb 100644 --- a/server.js +++ b/server.js @@ -88,7 +88,7 @@ makeElectronProcess(); server.get('/music/alex-bainter-:pieceId', (req, res) => { const { pieceId } = req.params; if (!pieceIds.includes(pieceId)) { - req.status(404).send('No such piece'); + res.status(404).send('No such piece'); } else { res.set('Cache-Control', 'no-cache, no-store'); res.set('Content-Type', 'audio/mpeg');