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

fix bug

parent 822c141b
Pipeline #21838 passed with stage
in 3 seconds
......@@ -3,6 +3,6 @@
module.exports = () => {
return async function auth(ctx, next) {
await ctx.helper.verify_token(ctx);
await next();
await next();
};
};
......@@ -15,4 +15,6 @@ module.exports = app => {
require('./router/official')(app);// 官网招聘和投资者关系
require('./router/common')(app);// 存储公共的东西,比如 cdn , oss, 白名单等等
require('./router/course_v5')(app);
};
......@@ -234,7 +234,7 @@ class UserService extends Service {
// 是否原来已经有数据
const babyInfo = await ctx.classModel.V5.CourseV5UserBaby.findOne({ where: { user_uuid: ctx.userUuid, status: 1, is_deleted: 0 } });
if (ctx.isEmpty(babyInfo)) {
await ctx.classModel.V5.CourseV5UserBaby.findOrCreate(data);
await ctx.classModel.V5.CourseV5UserBaby.findOrCreate({ where: { user_uuid: ctx.userUuid, status: 1, is_deleted: 0 }, defaults: data });
} else {
await ctx.classModel.V5.CourseV5UserBaby.update(data, { where: { id: babyInfo.id } });
}
......
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