mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
lower case key
This commit is contained in:
parent
d3659eea6e
commit
9d0077b184
@ -15,8 +15,9 @@ var webInterface = function(dbot) {
|
||||
});
|
||||
|
||||
app.get('/quotes/:key', function(req, res) {
|
||||
if(dbot.db.quoteArrs.hasOwnProperty(req.params.key)) {
|
||||
res.render('quotes', { 'quotes': dbot.db.quoteArrs[req.params.key] });
|
||||
var key = req.params.key.toLowerCase();
|
||||
if(dbot.db.quoteArrs.hasOwnProperty(key)) {
|
||||
res.render('quotes', { 'quotes': dbot.db.quoteArrs[key] });
|
||||
} else {
|
||||
res.render('error', { 'message': 'No quotes under that key.' });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user