Commit ffa0ad1d authored by 任国军's avatar 任国军

remove age check

parent e26fff71
Pipeline #22306 passed with stage
in 14 seconds
......@@ -73,10 +73,6 @@ class UserController extends Controller {
const { ctx, service } = this;
const params = ctx.request.body;
if (ctx.isEmpty(params) || ctx.isEmpty(params.baby_age)) {
ctx.failed('age is empty');
}
const ret = await service.course.v5.user.addUserBaby(params);
ctx.success(ret);
}
......
......@@ -270,8 +270,8 @@ class UserService extends Service {
async addUserBaby(input) {
const { ctx } = this;
const name = input.baby_name || 'qxk' + String(await this.getRandomNumber(6));
const age = input.baby_age || '';
const sex = input.baby_sex || '';
const age = input.baby_age || 0;
const sex = input.baby_sex || 1;
const birth = input.baby_birth || '';
const data = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment