mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
17 lines
447 B
JavaScript
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});
|
|
}
|
|
});
|
|
};
|