测试:添加测试用debug接口
This commit is contained in:
@@ -12,7 +12,7 @@ import { SclResultInter, SclPosInter } from '../../../pubUtils/interface';
|
||||
import { SchoolModel } from '../../../db/School';
|
||||
import { getTeraphStrengthenResult, getSchoolList } from '../../../services/roleService'
|
||||
import { calPlayerCeAndSave, calAllHeroCe } from '../../../services/playerCeService';
|
||||
import { HERO_SYSTEM_TYPE, LINEUP_NUM, ROLE_SELECT, REDIS_KEY, TASK_TYPE, DEFAULT_HEROES, DEFAULT_HERO_LV, DEFAULT_ITEMS, DEFAULT_EQUIPS, DEFAULT_GOLD, DEFAULT_COIN } from '../../../consts';
|
||||
import { HERO_SYSTEM_TYPE, LINEUP_NUM, ROLE_SELECT, REDIS_KEY, TASK_TYPE, DEFAULT_HEROES, DEFAULT_HERO_LV, DEFAULT_ITEMS, DEFAULT_EQUIPS, DEFAULT_GOLD, DEFAULT_COIN, DEBUG_MAGIC_WORD } from '../../../consts';
|
||||
import { checkBattleHeroesByHid } from '../../../services/normalBattleService';
|
||||
import { Rank } from '../../../services/rankService';
|
||||
import { updateUserInfo } from '../../../services/redisService';
|
||||
@@ -20,7 +20,7 @@ import { checkTaskWithHero, checkTask, checkTaskWithArgs, checkActivityTask } fr
|
||||
import { getGoldObject, getCoinObject } from '../../../pubUtils/itemUtils';
|
||||
import { RScriptRecordModel } from '../../../db/RScriptRecord';
|
||||
import { SkinModel, SkinUpdate } from '../../../db/Skin';
|
||||
import { CreateHeroes } from '../../../pubUtils/roleUtil';
|
||||
import { CreateHeroes, deletRole } from '../../../pubUtils/roleUtil';
|
||||
import { Figure } from '../../../domain/dbGeneral';
|
||||
import { getActivities } from '../../../services/activity/activityService';
|
||||
|
||||
@@ -536,4 +536,16 @@ export class RoleHandler {
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
|
||||
// debug接口,清空某个角色
|
||||
async debugClearRole(msg: { magicWord: string }, session: BackendSession) {
|
||||
const { magicWord } = msg;
|
||||
if (magicWord !== DEBUG_MAGIC_WORD) {
|
||||
return resResult(STATUS.TOKEN_ERR);
|
||||
}
|
||||
|
||||
let roleId = session.get('roleId');
|
||||
await deletRole(roleId);
|
||||
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,9 +152,9 @@ module.exports = {
|
||||
"role.heroHandler.roleTeraphQualityUp": {
|
||||
"required uInt32 id": 1
|
||||
},
|
||||
"role.roleHandler.initRole": {
|
||||
"required string roleName": 1
|
||||
},
|
||||
// "role.roleHandler.initRole": {
|
||||
// "required string roleName": 1
|
||||
// },
|
||||
"battle.normalBattleHandler.getBattleList": {
|
||||
"required uInt32 type": 1
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user