arma-server-web-admin/routes/workshop.js
2015-08-15 17:12:50 +02:00

17 lines
447 B
JavaScript

var path = require('path');
var SteamWorkshop = require('steam-workshop');
var config = require('./../config');
exports.mission = function(req, res){
var outputFolder = path.join(config.path, 'mpmissions');
var steamWorkshop = new SteamWorkshop(outputFolder);
steamWorkshop.downloadFile(req.body.id, function (err, files) {
if (err) {
res.json(500, {success: false});
} else {
res.json({success: true});
}
});
};