3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-25 04:02:39 +01:00

Add routing for web display of logs.

This commit is contained in:
Psychedelic Squid 2012-03-15 05:32:45 +08:00 committed by Luke Slater
parent 9d5cf694a8
commit e8eb665900

View File

@ -16,6 +16,11 @@ var webInterface = function(dbot) {
//res.render('index', { });
});
// Displays any logs collected by the logging module
app.get('/log', function(req, res) {
res.render('log', { 'name': dbot.name, 'log': (dbot.log || []) });
});
// Lists the quote categories
app.get('/quotes', function(req, res) {
res.render('quotelist', { 'name': dbot.name, 'quotelist': Object.keys(dbot.db.quoteArrs) });