diff --git a/modules/imgur/pages.js b/modules/imgur/pages.js index e257b40..42b7d0d 100644 --- a/modules/imgur/pages.js +++ b/modules/imgur/pages.js @@ -3,7 +3,15 @@ var _ = require('underscore')._; var pages = function(dbot) { return { '/imgur/random': function(req, res) { - res.render('imgurr', { + res.render('imgurr', { }); + }, + + '/imgur/stats': function(req, res) { + res.render('imgurstats', { + 'name': dbot.config.name, + 'totalHttpRequests': this.db.totalHttpRequests, + 'totalApiRequests': this.db.totalApiRequests, + 'totalImages': this.db.totalImages }); } }; diff --git a/views/imgur/imgurstats.jade b/views/imgur/imgurstats.jade new file mode 100644 index 0000000..0ede32d --- /dev/null +++ b/views/imgur/imgurstats.jade @@ -0,0 +1,9 @@ +extends ../layout + +block content + div#http + Total Imgur HTTP requests made: #{totalHttpRequests} + div#api + Total Imgur API requests made: #{totalApiRequests} + div#images + Total Images generated: #{totalImages}