unlisted levels

This commit is contained in:
oatmealine 2020-01-25 17:23:12 +03:00
parent e39a550b9a
commit c54a19abb4
No known key found for this signature in database
GPG Key ID: C4CB49CFAD721145
2 changed files with 7 additions and 5 deletions

View File

@ -8,6 +8,8 @@ module.exports = (app, db) : void => {
console.log(req.body);
if (isNaN(Number(req.body.str)) || req.body.str == '') searchQuery.unlisted = false;
if (req.body.featured != '0') searchQuery.featured = true;
if (req.body.epic != '0') searchQuery.epic = true;
if (req.body.coins != '0') searchQuery.coins = true;

View File

@ -5,7 +5,7 @@ module.exports = (app, db): void => {
.toArray();
levels.sort((a, b) => b.id - a.id);
let levelID = levels[0].id + 1;
console.log(req.body);
@ -35,16 +35,16 @@ module.exports = (app, db): void => {
'song_id': Number(req.body.songID),
'auto': Boolean(Number(req.body.auto || 0)),
'password': Number(req.body.password || 0),
'original': Boolean(req.body.original || 0),
'two_player': Boolean(req.body.twoPlayer || 0),
'original': Boolean(Number(req.body.original || 0)),
'two_player': Boolean(Number(req.body.twoPlayer || 0)),
'objects': Number(req.body.objects || 0),
'coins': Number(req.body.coins || 0),
'requested_stars': Number(req.body.requestedStars || 0),
'secret': req.body.secret,
'user_id': -1, // no user_id yet
'udid': udid, // ??? i have no idea what this is
'unlisted': Boolean(req.body.unlisted || 0),
'ldm': Boolean(req.body.ldm || 0),
'unlisted': Boolean(Number(req.body.unlisted || 0)),
'ldm': Boolean(Number(req.body.ldm || 0)),
// online stuff
'downloads': 0,
'likes': 0,