'use strict'; const moment = require('moment') async function appoint(ctx) { try { const models = ctx.fs.dc.models const { recordId, performerId, handleAdvice, handleState } = ctx.request.body await models.Report.update({ performerId, handleAdvice, handleState }, { where: { id: recordId } }) ctx.status = 204; } catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.status = 400; ctx.body = { message: typeof error == 'string' ? error : undefined } } } module.exports = { appoint };