任务:任务去除funcs的判断,直接达成

This commit is contained in:
luying
2021-09-10 16:53:35 +08:00
parent 28f9c65873
commit faf4d25f60
76 changed files with 471 additions and 610 deletions
+2 -4
View File
@@ -12,7 +12,7 @@ import { getAge } from '../pubUtils/timeUtil';
import { resResult } from '../pubUtils/util';
import { checkTeeanAgerTime } from '../pubUtils/authenticateUtil';
import { authenticate } from '../pubUtils/httpUtil';
import { checkTask, getCreateUserFuncs } from 'app/pubUtils/taskUtil';
import { checkTask } from 'app/pubUtils/taskUtil';
/**
* Test Service
@@ -305,10 +305,8 @@ export default class Auth extends Service {
const role = await RoleModel.createRole(uid, serverId, { roleId, code, roleName: roleId, seqId, lv: DEFAULT_LV, exp: (getExpByLv(DEFAULT_LV - 1) || { sum: 0 }).sum || 0 });
if (role) {
let funcs = await getCreateUserFuncs(role.funcs, role.lv);
// 任务
await checkTask(roleId, TASK_TYPE.ROLE_LV, role.lv, false, {}, funcs);
await checkTask(roleId, TASK_TYPE.ROLE_LV, role.lv, false, {});
return ctx.service.utils.resResult(STATUS.SUCCESS, { roleId: role.roleId });
}