12 lines
298 B
JavaScript
12 lines
298 B
JavaScript
|
const app = require('vn-loopback/server/server');
|
||
|
|
||
|
module.exports = Self => {
|
||
|
Self.observe('after save', async function() {
|
||
|
await app.models.ZoneClosure.doRecalc();
|
||
|
});
|
||
|
|
||
|
Self.observe('after delete', async function() {
|
||
|
await app.models.ZoneClosure.doRecalc();
|
||
|
});
|
||
|
};
|