Skip to content

Commit

Permalink
v2.9.17+12 Remove game check
Browse files Browse the repository at this point in the history
  • Loading branch information
cabbagelol committed Jan 8, 2025
1 parent a69e2bc commit 266f469
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions backend/routes/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,6 @@ async (req, res, next) => {
db.select('originUserId').from('users').where({originUserId: originUserId}) // check duplicated binding
])).length !== 0)
return res.status(400).json({error: 1, code: 'signup.originBindingExist'});
// check whether the user has at least 1 battlefield game
// /** @type {string[]} */
// const userGames = await serviceApi('eaAPI', '/userGames', false).query({userId: originUserId}).get().then(r => r.data);

// 检查库存中含有Battlefield系列游戏
// if (userGames && userGames.indexOf("Battlefield").length >= 0)
// return res.status(400).json({error: 1, code: 'signup.gameNotShowed'});

// no mistakes detected, generate a unique string for register validation
const randomStr = misc.generateRandomString(127);
Expand Down Expand Up @@ -385,9 +378,6 @@ async (req, res, next) => {
return res.status(400).json({error: 1, code: 'bindOrigin.originBindingExist'});
}

const userGames = await serviceApi('eaAPI', '/userGames', false).query({userId: originUserId}).get().then(r => r.data);
if (userGames && userGames.concat(' ').indexOf('Battlefield') === false) // does the user have battlefield?
return res.status(400).json({error: 1, code: 'bindOrigin.gameNotShowed'});
// no mistakes detected, generate code for verify
const code = misc.generateRandomString(127);
await db('verifications').insert({
Expand Down

0 comments on commit 266f469

Please sign in to comment.