var _ = require('lodash');

module.exports = function (app) {

    var db = app.get('db');
    
    app.get('/tags', function (req, res) {
        db.queries.find({}, function (err, queries) {
            var tags = _.uniq(_.flatten(queries, 'tags')).sort();
            res.json(tags);
        });
    });

};
@@ -226,16 +226,22 @@
 flatten(
+_.map(
 queries,
@@ -249,16 +249,17 @@
 'tags'))
+)
 .sort();

fix tags route after lodash upgrade