Reject related request with include parameter

This commit is contained in:
Aurélien Georget 2016-01-26 16:30:31 +01:00
parent 38f9239ec9
commit 8408538f21

View File

@ -25,7 +25,8 @@ module.exports = {
const type = this.getType(ctx, actionRoute.controller);
// Fetch a relationship that does not exist
if (_.isUndefined(type)) {
// Reject related request with `include` parameter
if (_.isUndefined(type) || (type === 'related' && ctx.params.hasOwnProperty('include'))) {
ctx.response.status = 404;
ctx.response.body = '';