服务器:修改服务器列表
This commit is contained in:
@@ -29,13 +29,9 @@ export default class Game extends Service {
|
||||
/**
|
||||
* 获取正式服,测试服,开发服等环境
|
||||
*/
|
||||
public async getServerListByEnv() {
|
||||
const { ctx, app } = this;
|
||||
const envlist = await GameModel.getServerEnvList();
|
||||
let cur = envlist.find(cur => cur.env == app.config.env);
|
||||
if(!cur) return ctx.service.utils.resResult(STATUS.SUCCESS, { list: [] });
|
||||
|
||||
const list = await ServerlistModel.findByServerType(cur.serverType);
|
||||
public async getServerListByEnv(serverType?: string) {
|
||||
const { ctx } = this;
|
||||
const list = await ServerlistModel.findByServerType(serverType);
|
||||
|
||||
return ctx.service.utils.resResult(STATUS.SUCCESS, {
|
||||
list
|
||||
|
||||
Reference in New Issue
Block a user