"use strict";

//Load dependencies
var applicationStorage = process.require("core/applicationStorage.js");
var mythicDungeonModel = process.require("mythicDungeons/mythicDungeonModel.js");

module.exports.getRanking = function (req, res, next) {

    var logger = applicationStorage.logger;
    logger.info("%s %s %s %s", req.headers['x-forwarded-for'] || req.connection.remoteAddress, req.method, req.path, JSON.stringify(req.params));

    mythicDungeonModel.find(req.params.extension, {}, function (error, runs) {
        console.log(runs);
        if (error) {
            logger.error(error.message);
            res.status(500).send(error.message);
        } else if (runs && runs.length > 0) {
            res.json(runs);
        } else {
            next();
        }
    });
};
@@ -431,16 +431,334 @@
 ams));%0A%0A
+    var criteria = %7B%7D;%0A%0A    if (req.query && req.query.region) %7B%0A        criteria.region = req.query.region;%0A    %7D%0A%0A    if (req.query && req.query.affixes) %7B%0A        criteria.affixes = req.query.affixes.split(' ');%0A    %7D%0A%0A    if (req.query && req.query.dungeon) %7B%0A%0A        criteria.dungeon = req.query.dungeon;%0A    %7D%0A%0A
     myth
@@ -799,18 +799,24 @@
 ension, 
-%7B%7D
+criteria
 , functi
@@ -838,34 +838,9 @@
 ) %7B%0A
-        console.log(runs);
+%0A
 %0A   

Add filter for dungeon