0
是否有可能为loopback中的所有api调用编写一个通用的beforeRemote钩子。目前,我能写beforeRemote挂钩所有API在通过该模型特定的模型对象,如:Beforeremote所有的api调用loopback
modelObj.beforeRemote('*', function (ctx, req, next) {
//code
next()
});
同样是有可能写一个远程前对所有API调用。任何帮助,将不胜感激!谢谢!