log tiquet request
This commit is contained in:
parent
731e411cf8
commit
8be929c1da
|
@ -31,6 +31,7 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.confirm = async ctx => {
|
||||
const userId = ctx.req.accessToken.userId;
|
||||
const models = Self.app.models;
|
||||
const tx = await Self.beginTransaction({});
|
||||
const $t = ctx.req.__; // $translate
|
||||
|
@ -92,6 +93,20 @@ module.exports = Self => {
|
|||
});
|
||||
await models.Chat.sendCheckingPresence(ctx, requesterId, message);
|
||||
|
||||
// loguejar
|
||||
let logRecord = {
|
||||
originFk: sale.ticketFk,
|
||||
userFk: userId,
|
||||
action: 'update',
|
||||
changedModel: 'ticketRequest',
|
||||
newInstance: {
|
||||
destinationFk: sale.ticketFk,
|
||||
message: message
|
||||
}
|
||||
};
|
||||
|
||||
await Self.app.models.TicketLog.create(logRecord);
|
||||
|
||||
await tx.commit();
|
||||
|
||||
return sale;
|
||||
|
|
Loading…
Reference in New Issue