fix(one-to-many): raw parameters are removed

This commit is contained in:
Mahdi Dibaiee 2016-03-12 09:58:05 +03:30
parent 11291f0e08
commit 097a9adcf3
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "hapi-sequelize-crud", "name": "hapi-sequelize-crud",
"version": "2.0.0", "version": "2.0.1",
"description": "Hapi plugin that automatically generates RESTful API for CRUD", "description": "Hapi plugin that automatically generates RESTful API for CRUD",
"main": "build/index.js", "main": "build/index.js",
"config": { "config": {

View File

@ -152,7 +152,9 @@ export const destroy = (server, a, b, names) => {
const where = parseWhere(request); const where = parseWhere(request);
const base = await a.findOne({ const base = await a.findOne({
where: request.params.aid where: {
id: request.params.aid
}
}); });
const method = getMethod(base, names.b); const method = getMethod(base, names.b);