swfredrik

Results issues of swfredrik

module.exports = function(Home) { Home.observe('before save', function (ctx, next) { console.log("before save") console.log(ctx.data.id); ``` Home.findById(ctx.data.id, function(err, instance){ console.log(instance) ctx.hookState = instance; next(); }) ``` }); Home.observe('after save', function (ctx, next)...

How can I get the current user in an operation hook? I've tried the guide using context vice versa but can't get it to work. Also reading that the loopback-contex...