улучшена оформление главной

This commit is contained in:
Alexey Kasyanchuk
2017-01-02 05:42:27 +03:00
parent 4843b6eef6
commit e9b61f6824
8 changed files with 105 additions and 42 deletions

View File

@ -61,6 +61,9 @@ socketMysql.connect(function(mysqlError) {
socket.on('torrent', function(hash, options, callback)
{
if(hash.length != 40)
return;
socketMysql.query('SELECT * FROM `torrents` WHERE `hash` = ?', hash, function (error, rows, fields) {
if(rows.length == 0) {
callback(undefined);
@ -84,6 +87,9 @@ socketMysql.connect(function(mysqlError) {
socket.on('search', function(text, callback)
{
if(!text || text.length <= 2)
return;
let search = {};
console.log(text);