Loopback: How to add afterRemote of a model to another model
问题 I have Notification model which looks like this "use strict"; module.exports = function(Notification) { }; And I have another model which is Post: "use strict"; module.exports = function(Post) { Post.prototype.postLike = function(options, cb) { this.likes.add(options.accessToken.userId); cb(null, "sucess"); }; Post.remoteMethod("postLike", { isStatic: false, accepts: [{ arg: "options", type: "object", http: "optionsFromRequest" }], returns: { arg: "name", type: "string" }, http: { path: "