我正在使用feathersjs 。
我已阅读文档。
我如何执行这个方法来检查服务挂钩feathers-hook,或者告诉我另一种检查方法。
const { disallow } = require('feathers-hooks-common');
function include() {
return function (hook) {
const productPrice = hook.app.service('product-prices').Model;
const currencies = hook.app.service('currencies').Model;
const edizm = hook.app.service('edizm').Model;
const pricesShema = { model: productPrice,
include: [
{
model: currencies,
attributes: ['title', 'socr']
},
]
};
const edizmShema = { model: edizm,
attributes: ['title', 'detail']
};
let association={include: [edizmShema, pricesShema]};
hook.params.sequelize = Object.assign(association,{ raw: false });
return Promise.resolve(hook);
}
}
module.exports = {
......
};