diff --git a/src/controllers/games/reward.js b/src/controllers/games/reward.js index ba6350c..8d624c1 100644 --- a/src/controllers/games/reward.js +++ b/src/controllers/games/reward.js @@ -252,6 +252,7 @@ router.post('/kefu-cfg', async (req, res, next) => { if (kefuStatus === 200) { const key = `kefu:${body.game_id}:6001` + // TODO: 迁移至正式服redis await redisDao.updateOneKey( key, JSON.stringify({msg_key: body.msg_key, img_url: body.img_url}) diff --git a/src/controllers/games/settings.js b/src/controllers/games/settings.js index 972516e..019379b 100644 --- a/src/controllers/games/settings.js +++ b/src/controllers/games/settings.js @@ -110,7 +110,6 @@ router.get('/one_game_cfg', async (req, res, next) => { /* 还原配置(获取正式配置) */ router.get('/reset_one_game_cfg', async (req, res, next) => { - // logger.db(req, '游戏管理', '配置管理', '获取单个游戏正式服配置信息'); // 权限判断 const hasPerm = @@ -394,7 +393,12 @@ router.get('/ac-conds', async (req, res, next) => { const key = `config:${query.game_id}:ac-conds` try { - const result = await redisDao.getByKey(key) + const client = redis.createClient({ + host: config.redisPublish.host, + port: config.redisPublish.port, + password: config.redisPublish.password, + }) + const result = await client.getAsync(key) res.send({ errcode: 0, result: JSON.parse(result) || {}, @@ -424,7 +428,12 @@ router.post('/ac-conds', async (req, res, next) => { const acConds = JSON.stringify(body.acConds) try { - const result = await redisDao.updateOneKey(key, acConds) + const client = redis.createClient({ + host: config.redisPublish.host, + port: config.redisPublish.port, + password: config.redisPublish.password, + }) + const result = await client.setAsync(key, acConds) res.send({ errcode: 0, })