cf8b0fb9
Nung Poti
template master
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
cb(null,respone);
};
Customer.remoteMethod('getName',{
http:{path:'/getName',verb:'post'},
accepts: { arg: 'ctx', type: 'object', http: { source: 'body' } } ,
returns: {arg: 'data', type: 'object', root: true}
});
Customer.observe('before save', function filterProperties(ctx, next) {
console.tag('process').log(ctx);
if (ctx.instance) {
console.tag('process').log('before save');
}
next();
});
Customer.observe('after save', function filterProperties(ctx, next) {
console.tag('process').log('after save');
if (ctx.instance) {
}
});
};
|