salix/modules/claim/back/models/claim-rma.js

10 lines
335 B
JavaScript
Raw Permalink Normal View History

2022-10-25 12:09:21 +00:00
const LoopBackContext = require('loopback-context');
module.exports = Self => {
Self.observe('before save', async function(ctx) {
const changes = ctx.data || ctx.instance;
const loopBackContext = LoopBackContext.getCurrentContext();
changes.workerFk = loopBackContext.active.accessToken.userId;
});
};