diff --git a/api/lottery.js b/api/lottery.js index 17d8e29..7331990 100644 --- a/api/lottery.js +++ b/api/lottery.js @@ -98,8 +98,9 @@ const byEpochDate = (req, res) => { const byName = (req, res) => { const { name } = req.params; + const regexName = new RegExp(name, "i"); // lowercase regex of the name - return Highscore.find({ name }) + return Highscore.find({ "name": { $regex : regexName } }) .then(async (highscore) => { highscore = highscore[0] if (highscore) {