Merge pull request #6317 from overleaf/jpa-send-explicit-content-type
[web] send explicit content type in responses GitOrigin-RevId: d5aeaba57a7d2fc053fbf5adc2299fb46e435341
This commit is contained in:
@@ -117,7 +117,7 @@ module.exports = CompileController = {
|
||||
if (error != null) {
|
||||
return next(error)
|
||||
}
|
||||
return res.status(200).send()
|
||||
return res.sendStatus(200)
|
||||
})
|
||||
},
|
||||
|
||||
@@ -159,15 +159,12 @@ module.exports = CompileController = {
|
||||
if (error != null) {
|
||||
return next(error)
|
||||
}
|
||||
res.contentType('application/json')
|
||||
return res.status(200).send(
|
||||
JSON.stringify({
|
||||
status,
|
||||
outputFiles,
|
||||
clsiServerId,
|
||||
validationProblems,
|
||||
})
|
||||
)
|
||||
return res.json({
|
||||
status,
|
||||
outputFiles,
|
||||
clsiServerId,
|
||||
validationProblems,
|
||||
})
|
||||
}
|
||||
)
|
||||
},
|
||||
@@ -564,8 +561,7 @@ module.exports = CompileController = {
|
||||
if (error != null) {
|
||||
return next(error)
|
||||
}
|
||||
res.contentType('application/json')
|
||||
return res.send(body)
|
||||
return res.json(body)
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user