mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-04 08:04:25 +02:00
core/api: no longer reassign to const
This commit is contained in:
parent
58e525de61
commit
a305bdb78d
@ -79,7 +79,7 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
|
||||
|
||||
// handle express.json errors properly (https://github.com/expressjs/express/issues/4065)
|
||||
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";
|
||||
|
||||
if (err || acceptHeader) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user