fix(associate): associating one way is enough

fix(destroy): directly get a `destroy` method instead of find and destroy
This commit is contained in:
Mahdi Dibaiee
2016-03-31 20:40:01 +04:30
parent afb08670e8
commit 544dc23723
4 changed files with 7 additions and 14 deletions

View File

@ -79,10 +79,9 @@ export const destroy = (server, a, b, names) => {
}
});
const method = getMethod(base, names.b, false);
const method = getMethod(base, names.b, false, 'destroy');
const instance = await method({ where, include });
await instance.destroy();
reply(instance);
}