unlisted levels
This commit is contained in:
parent
e39a550b9a
commit
c54a19abb4
|
@ -8,6 +8,8 @@ module.exports = (app, db) : void => {
|
||||||
|
|
||||||
console.log(req.body);
|
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.featured != '0') searchQuery.featured = true;
|
||||||
if (req.body.epic != '0') searchQuery.epic = true;
|
if (req.body.epic != '0') searchQuery.epic = true;
|
||||||
if (req.body.coins != '0') searchQuery.coins = true;
|
if (req.body.coins != '0') searchQuery.coins = true;
|
||||||
|
|
|
@ -35,16 +35,16 @@ module.exports = (app, db): void => {
|
||||||
'song_id': Number(req.body.songID),
|
'song_id': Number(req.body.songID),
|
||||||
'auto': Boolean(Number(req.body.auto || 0)),
|
'auto': Boolean(Number(req.body.auto || 0)),
|
||||||
'password': Number(req.body.password || 0),
|
'password': Number(req.body.password || 0),
|
||||||
'original': Boolean(req.body.original || 0),
|
'original': Boolean(Number(req.body.original || 0)),
|
||||||
'two_player': Boolean(req.body.twoPlayer || 0),
|
'two_player': Boolean(Number(req.body.twoPlayer || 0)),
|
||||||
'objects': Number(req.body.objects || 0),
|
'objects': Number(req.body.objects || 0),
|
||||||
'coins': Number(req.body.coins || 0),
|
'coins': Number(req.body.coins || 0),
|
||||||
'requested_stars': Number(req.body.requestedStars || 0),
|
'requested_stars': Number(req.body.requestedStars || 0),
|
||||||
'secret': req.body.secret,
|
'secret': req.body.secret,
|
||||||
'user_id': -1, // no user_id yet
|
'user_id': -1, // no user_id yet
|
||||||
'udid': udid, // ??? i have no idea what this is
|
'udid': udid, // ??? i have no idea what this is
|
||||||
'unlisted': Boolean(req.body.unlisted || 0),
|
'unlisted': Boolean(Number(req.body.unlisted || 0)),
|
||||||
'ldm': Boolean(req.body.ldm || 0),
|
'ldm': Boolean(Number(req.body.ldm || 0)),
|
||||||
// online stuff
|
// online stuff
|
||||||
'downloads': 0,
|
'downloads': 0,
|
||||||
'likes': 0,
|
'likes': 0,
|
||||||
|
|
Loading…
Reference in New Issue