后台:json上传
This commit is contained in:
@@ -4,6 +4,7 @@ import { Controller } from 'egg';
|
||||
import { RoleModel } from '@db/Role';
|
||||
import { NoticeModel } from '@db/Notice';
|
||||
import { ServerParamWithRole, GroupParam } from '../domain/gameField/serverlist';
|
||||
import { reloadResources } from 'app/pubUtils/data';
|
||||
|
||||
export default class GameController extends Controller {
|
||||
|
||||
@@ -86,4 +87,18 @@ export default class GameController extends Controller {
|
||||
}
|
||||
|
||||
|
||||
public async reloadResource() {
|
||||
const { ctx } = this;
|
||||
|
||||
try {
|
||||
|
||||
reloadResources();
|
||||
ctx.body = ctx.service.utils.resResult(STATUS.SUCCESS, { isOK: true });
|
||||
return;
|
||||
} catch(e) {
|
||||
ctx.body = ctx.service.utils.resResult(STATUS.SUCCESS, { isOK: false, err: e.stack });
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user