mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-01-27 09:39:19 +01:00
fix(torrents): check torrent status when user download a torrent
This commit is contained in:
@@ -513,6 +513,10 @@ exports.download = function (req, res) {
|
||||
return res.status(703).send({
|
||||
message: 'SERVER.CAN_NOT_DOWNLOAD_IDLE'
|
||||
});
|
||||
} else if (req.torrent.torrent_status !== 'reviewed') {
|
||||
return res.status(704).send({
|
||||
message: 'SERVER.TORRENT_STATUS_ERROR'
|
||||
});
|
||||
} else {
|
||||
fs.exists(filePath, function (exists) {
|
||||
if (exists) {
|
||||
|
||||
Reference in New Issue
Block a user