mirror of
https://github.com/reality/dbot.git
synced 2024-11-30 16:09:27 +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) {
|
app.get('/quotes/:key', function(req, res) {
|
||||||
if(dbot.db.quoteArrs.hasOwnProperty(req.params.key)) {
|
var key = req.params.key.toLowerCase();
|
||||||
res.render('quotes', { 'quotes': dbot.db.quoteArrs[req.params.key] });
|
if(dbot.db.quoteArrs.hasOwnProperty(key)) {
|
||||||
|
res.render('quotes', { 'quotes': dbot.db.quoteArrs[key] });
|
||||||
} else {
|
} else {
|
||||||
res.render('error', { 'message': 'No quotes under that key.' });
|
res.render('error', { 'message': 'No quotes under that key.' });
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user