Merge pull request #100 from Dahlgren/bugfix/mods-endpoints-send-status

Add missing send response to mods requests
This commit is contained in:
Björn Dahlgren 2018-01-20 22:02:31 +01:00 committed by GitHub
commit a880c48523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,12 +9,12 @@ module.exports = function (modsManager) {
router.post('/', function (req, res) { router.post('/', function (req, res) {
modsManager.download(req.body.name) modsManager.download(req.body.name)
res.status(204) res.status(204).send()
}) })
router.put('/:mod', function (req, res) { router.put('/:mod', function (req, res) {
modsManager.download(req.params.mod) modsManager.download(req.params.mod)
res.status(204) res.status(204).send()
}) })
router.delete('/:mod', function (req, res) { router.delete('/:mod', function (req, res) {
@ -22,14 +22,14 @@ module.exports = function (modsManager) {
if (err) { if (err) {
res.status(500).send(err) res.status(500).send(err)
} else { } else {
res.status(204) res.status(204).send()
} }
}) })
}) })
router.post('/refresh', function (req, res) { router.post('/refresh', function (req, res) {
modsManager.updateMods() modsManager.updateMods()
res.status(204) res.status(204).send()
}) })
router.post('/search', function (req, res) { router.post('/search', function (req, res) {