From c90f5e6fb754692fd54186260c7109f410349f69 Mon Sep 17 00:00:00 2001 From: Alexey Kasyanchuk Date: Sun, 15 Jan 2017 17:58:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=B5=20=D0=B8=D0=BD=D0=B4=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=D0=B8=D1=80=D1=83=D0=B5=D0=BC=20=D0=B7=D0=B0=D0=BF=D1=80?= =?UTF-8?q?=D0=B5=D1=89=D0=B5=D0=BD=D0=BD=D1=8B=D0=B9=20=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D1=82=D0=B5=D0=BD=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 09e7160..c1e427b 100644 --- a/index.js +++ b/index.js @@ -90,7 +90,7 @@ app.use(express.static('build', {index: false})); const sitemapSize = 30000; app.get('/sitemap.xml', function(req, res) { - socketMysql.query('SELECT count(*) as cnt FROM `torrents`', function (error, rows, fields) { + socketMysql.query('SELECT count(*) as cnt FROM `torrents` WHERE contentCategory != \'xxx\' OR contentCategory IS NULL', function (error, rows, fields) { if(!rows) { return; } @@ -111,7 +111,7 @@ app.get('/sitemap:id.xml', function(req, res) { let page = (req.params.id - 1) * sitemapSize - socketMysql.query('SELECT hash FROM `torrents` LIMIT ?, ?', [page, sitemapSize], function (error, rows, fields) { + socketMysql.query('SELECT hash FROM `torrents` WHERE contentCategory != \'xxx\' OR contentCategory IS NULL LIMIT ?, ?', [page, sitemapSize], function (error, rows, fields) { if(!rows) { return; }