更换成就配置redis地址
This commit is contained in:
parent
59e3f2e84c
commit
81c0ef5e07
@ -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})
|
||||
|
@ -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,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user