core/api: no longer reassign to const

This commit is contained in:
wukko 2024-05-15 22:51:26 +06:00
parent 58e525de61
commit a305bdb78d
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -79,7 +79,7 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
// handle express.json errors properly (https://github.com/expressjs/express/issues/4065) // handle express.json errors properly (https://github.com/expressjs/express/issues/4065)
app.use('/api/json', (err, req, res, next) => { app.use('/api/json', (err, req, res, next) => {
const errorText = "invalid json body"; let errorText = "invalid json body";
const acceptHeader = String(req.header('Accept')) !== "application/json"; const acceptHeader = String(req.header('Accept')) !== "application/json";
if (err || acceptHeader) { if (err || acceptHeader) {