Release v1.6.1 - Improve fraction stats #17

Merged
hardi merged 1 commits from release/v1.6.2 into master 2017-11-04 21:08:17 +01:00
1 changed files with 8 additions and 1 deletions

View File

@ -176,8 +176,15 @@ wars.route('/:id')
return next(err);
}
// delete players having this war ID as foreign key
// delete linked appearances
PlayerModel.find({warId: item._id}).remove().exec();
LogKillModel.find({war: item._id}).remove().exec();
LogRespawnModel.find({war: item._id}).remove().exec();
LogReviveModel.find({war: item._id}).remove().exec();
LogFlagModel.find({war: item._id}).remove().exec();
LogBudgetModel.find({war: item._id}).remove().exec();
LogTransportModel.find({war: item._id}).remove().exec();
LogPointsModel.find({war: item._id}).remove().exec();
// check if logfiles exist and delete from fs
const warDir = __dirname + '/../resource/logs/' + req.params.id;