seedlinux

find open source torrents and stats for people wishing to contribute bandwidth.
git clone git://git.beardyjay.co.uk/seedlinux
Log | Files | Refs | README | LICENSE

commit 0c1c45b700d9233039c19f016dc7f1fab60f84db
parent 1b35f2770931ab82e0de79d6e6ef6861da3e295f
Author: Jay Scott <jay@beardyjay.co.uk>
Date:   Fri, 30 Jun 2017 11:26:56 +0100

catch error if no torrents are in the DB

Diffstat:
Mcontrollers/torrents_controller.js | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/controllers/torrents_controller.js b/controllers/torrents_controller.js @@ -13,6 +13,10 @@ exports.index = function(req, res) { Torrent.find({},callback); }, }, function(err, results) { + if(!results) { + console.log(results.torrent_count); + results.torrent_count == 0; + } res.render('torrent', { title: 'Index Page', error: err, data: results }); }); };