level search
This commit is contained in:
parent
7bd647979d
commit
8d98eb7a00
|
@ -4,7 +4,9 @@ module.exports = (app, db) : void => {
|
|||
app.post('/aa/database/getGJLevels21.php', async (req, res) => {
|
||||
let levelsString = '';
|
||||
|
||||
const levels = await db.collection('levels').find({})
|
||||
const levels = await db.collection('levels').find({
|
||||
$or: [{id: Number(req.body.str)}, {name: {$regex: `${req.body.str}`}}]
|
||||
})
|
||||
.toArray();
|
||||
|
||||
// TODO: searching
|
||||
|
|
Loading…
Reference in New Issue