mirror of
https://github.com/strapi/strapi.git
synced 2025-08-11 02:07:51 +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": {
|
||||
"policies": [
|
||||
"routing",
|
||||
"admin::isAuthenticatedAdmin",
|
||||
["plugins::content-manager.hasPermissions", ["plugins::content-manager.explorer.read"]]
|
||||
"admin::isAuthenticatedAdmin"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -278,13 +278,13 @@ module.exports = {
|
||||
|
||||
async findRelationList(ctx) {
|
||||
const { model, targetField } = ctx.params;
|
||||
const { query } = ctx.request;
|
||||
const { _component, ...query } = ctx.request.query;
|
||||
|
||||
if (!targetField) {
|
||||
return ctx.badRequest();
|
||||
}
|
||||
|
||||
const modelDef = strapi.db.getModel(model);
|
||||
const modelDef = _component ? strapi.db.getModel(_component) : strapi.db.getModel(model);
|
||||
|
||||
if (!modelDef) {
|
||||
return ctx.notFound('model.notFound');
|
||||
|
Loading…
x
Reference in New Issue
Block a user