Browse Source

(*)部门培训修改接口调整

master
zmh 2 years ago
parent
commit
1bdc32696a
  1. 5
      api/app/lib/controllers/departmentTrain/index.js

5
api/app/lib/controllers/departmentTrain/index.js

@ -1,4 +1,7 @@
'use strict';
const moment = require("moment/moment");
async function get(ctx) {
try {
const { limit, page } = ctx.query;
@ -45,7 +48,7 @@ async function modify(ctx) {
if (!existRes) {
throw '当前部门培训记录信息不存在';
}
await models.DeptTraining.update({ ...rest }, { where: { id: id } });
await models.DeptTraining.update({ updateDate: moment(), ...rest }, { where: { id: id } });
ctx.status = 204;
} catch (error) {
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);

Loading…
Cancel
Save