Model fix
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
0208b31f44
commit
3456438485
|
@ -1,11 +1,11 @@
|
|||
const {models} = require('vn-loopback/server/server');
|
||||
const app = require('vn-loopback/server/server');
|
||||
|
||||
module.exports = Self => {
|
||||
app.on('started', function() {
|
||||
let models = ['Zone', 'ZoneEvent', 'ZoneExclusion'];
|
||||
|
||||
for (let modelName of models) {
|
||||
let Model = models[modelName];
|
||||
let Model = app.models[modelName];
|
||||
|
||||
Model.observe('after save', doCalc);
|
||||
Model.observe('after delete', doCalc);
|
||||
|
|
Loading…
Reference in New Issue