🧪 test(debug): 新武将关卡添加重置功能

This commit is contained in:
luying
2023-06-09 17:26:37 +08:00
parent 3da910c078
commit ed6810ba23
2 changed files with 9 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ import { Application, BackendSession, HandlerService, } from 'pinus';
import { resResult } from '../../../pubUtils/util';
import { STATUS } from '../../../consts';
import { getPlayerNewHeroGKData } from '../../../services/activity/newHeroGKService';
import { ActivityNewHeroGKModel } from '../../../db/ActivityNewHeroGK';
export default function (app: Application) {
@@ -63,4 +64,11 @@ export class NewHeroGKHandler {
return resResult(STATUS.SUCCESS);
}
async debugResetGK(msg: {}, session: BackendSession) {
const roleId = session.get('roleId');
await ActivityNewHeroGKModel.deleteMany({ roleId });
return resResult(STATUS.SUCCESS);
}
}

View File

@@ -2112,6 +2112,7 @@ export function checkRouteParam(route: string, msg: any) {
case "activity.monthlyFundHandler.debugSendMonthlyFundReward":
case "activity.bindPhoneHandler.debugSetGiftCodeStatus":
case 'activity.rebateHandler.debugSetRebate':
case 'activity.newHeroGKHandler.debugResetGK':
{
if (msg.magicWord !== DEBUG_MAGIC_WORD || !isDevelopEnv()) return false;