"followers": { "type": "hasMany", "model": "FitUser", "foreignKey": "followeeId", "keyThrough": "followerId", "through": "FitFollow" },
{ "principalType": "ROLE", "principalId": "$owner", "permission": "ALLOW", "property": "__get__followers" }
FitUser.afterRemote('__get__followers', function(context, user, next) {
console.log('> fitUser.__get__followers triggered.');
console.log('> result:' + JSON.stringify(context.result));
// ...
next();
});
If I changed the '__get__followers' to 'get followers' , 'getFollowers', or '.followers', the code will not be executed either. The code will be executed only when using '**', but that's not what i want.
What is the right way?
Thanks!
Hanzhi