diff --git a/api/app/lib/controllers/member/index.js b/api/app/lib/controllers/member/index.js index 6fad724..ae97fd8 100644 --- a/api/app/lib/controllers/member/index.js +++ b/api/app/lib/controllers/member/index.js @@ -817,6 +817,7 @@ async function postPositionRating(ctx) { } } async function delPositionRating(ctx) { + const transaction = await ctx.fs.dc.orm.transaction(); try { const { models } = ctx.fs.dc; const { id } = ctx.params; @@ -824,7 +825,7 @@ async function delPositionRating(ctx) { const oldData = await models.PositionRating.findOne({ where: { id: id } }); if (oldData) { //todo 更新memeber技术等级字段 - await models.PositionRating.destory({ where: { id: id }, transaction }); + await models.PositionRating.destroy({ where: { id: id }, transaction }); } ctx.status = 204; } catch (error) {