过滤app_key列表
This commit is contained in:
parent
70283d0120
commit
6fff1034aa
@ -54,7 +54,7 @@ router.get('/list', async (req, res, next) => {
|
|||||||
router.get('/keys', async (req, res, next) => {
|
router.get('/keys', async (req, res, next) => {
|
||||||
try {
|
try {
|
||||||
const games = await GameInfo.find({deleted: false})
|
const games = await GameInfo.find({deleted: false})
|
||||||
const result = []
|
let result = []
|
||||||
games.map(game => {
|
games.map(game => {
|
||||||
result.push({
|
result.push({
|
||||||
game: game.game_name,
|
game: game.game_name,
|
||||||
@ -63,6 +63,11 @@ router.get('/keys', async (req, res, next) => {
|
|||||||
app_key: game.app_key || '',
|
app_key: game.app_key || '',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
result = result.filter(item => {
|
||||||
|
return item.game_id.toString().startsWith('5')
|
||||||
|
})
|
||||||
|
|
||||||
res.send({
|
res.send({
|
||||||
errcode: 0,
|
errcode: 0,
|
||||||
gameList: result,
|
gameList: result,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user