|
|
@ -169,7 +169,7 @@ function modsList(req, res, next) { |
|
|
|
var _files = files.map(f => { |
|
|
|
var iconName = [] |
|
|
|
switch (path.extname(f)) { |
|
|
|
case '.zip' : iconName = 'redstone-dust.png'; break; |
|
|
|
case '.zip' : iconName = 'command-block.png'; break; |
|
|
|
case undefined : iconName = 'book.png'; break; |
|
|
|
default : iconName = 'paper.png'; break; |
|
|
|
} |
|
|
@ -197,7 +197,7 @@ function modsUpload(req, res, next) { |
|
|
|
|
|
|
|
function modsDelete(req, res, next) { |
|
|
|
fs.unlink(path.join(modsFolderPath, req.body.fileName), (err) => { |
|
|
|
if (err) return next(new HttpError(500, 'error deleting'+req.body.fileName)); |
|
|
|
if (err) return next(new HttpError(500, 'error deleting '+req.body.fileName)); |
|
|
|
next(new HttpSuccess(202, {})); |
|
|
|
}); |
|
|
|
} |
|
|
|