mirror of
https://github.com/strapi/strapi.git
synced 2025-11-14 09:07:59 +00:00
Reject related request with include parameter
This commit is contained in:
parent
38f9239ec9
commit
8408538f21
@ -25,7 +25,8 @@ module.exports = {
|
|||||||
const type = this.getType(ctx, actionRoute.controller);
|
const type = this.getType(ctx, actionRoute.controller);
|
||||||
|
|
||||||
// Fetch a relationship that does not exist
|
// 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.status = 404;
|
||||||
ctx.response.body = '';
|
ctx.response.body = '';
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user