fix(vote): proper vote data sequencing

This commit is contained in:
Alexey Kasyanchuk
2018-04-18 18:54:56 +03:00
parent 5e02b0df73
commit f23310065d
6 changed files with 175 additions and 205 deletions

View File

@ -106,14 +106,12 @@ module.exports = ({
if(options.files)
{
sphinx.query('SELECT * FROM `files` WHERE `hash` = ? LIMIT 50000', hash, function (error, rows, fields) {
torrent.filesList = rows;
callback(baseRowData(torrent))
});
torrent.filesList = await sphinx.query('SELECT * FROM `files` WHERE `hash` = ? LIMIT 50000', hash);
callback(baseRowData(torrent))
}
else
{
callback(baseRowData(torrent))
callback(baseRowData(torrent))
}
if(torrentClientHashMap[hash])