Feat/personal highscore #44

Merged
KevinMidboe merged 19 commits from feat/personal-highscore into master 2020-10-11 16:19:52 +00:00
Showing only changes of commit 9b2de75910 - Show all commits

View File

@@ -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) {