mirror of
https://github.com/strapi/strapi.git
synced 2025-08-13 11:17:42 +00:00
Allow compo option
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
This commit is contained in:
parent
29fcf7c3cd
commit
c31c86c8e5
@ -107,8 +107,7 @@
|
|||||||
"config": {
|
"config": {
|
||||||
"policies": [
|
"policies": [
|
||||||
"routing",
|
"routing",
|
||||||
"admin::isAuthenticatedAdmin",
|
"admin::isAuthenticatedAdmin"
|
||||||
["plugins::content-manager.hasPermissions", ["plugins::content-manager.explorer.read"]]
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -278,13 +278,13 @@ module.exports = {
|
|||||||
|
|
||||||
async findRelationList(ctx) {
|
async findRelationList(ctx) {
|
||||||
const { model, targetField } = ctx.params;
|
const { model, targetField } = ctx.params;
|
||||||
const { query } = ctx.request;
|
const { _component, ...query } = ctx.request.query;
|
||||||
|
|
||||||
if (!targetField) {
|
if (!targetField) {
|
||||||
return ctx.badRequest();
|
return ctx.badRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
const modelDef = strapi.db.getModel(model);
|
const modelDef = _component ? strapi.db.getModel(_component) : strapi.db.getModel(model);
|
||||||
|
|
||||||
if (!modelDef) {
|
if (!modelDef) {
|
||||||
return ctx.notFound('model.notFound');
|
return ctx.notFound('model.notFound');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user