mirror of
https://github.com/strapi/strapi.git
synced 2025-11-14 17:19:01 +00:00
Update packages/core/utils/lib/convert-query-params.js
Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu>
This commit is contained in:
parent
00f43de9b7
commit
cb0225e316
@ -410,15 +410,11 @@ const isValidSchemaAttribute = (key, schema) => {
|
|||||||
|
|
||||||
// case insensitive check if the attribute exists in the schema
|
// case insensitive check if the attribute exists in the schema
|
||||||
const findAttribute = key.toLowerCase();
|
const findAttribute = key.toLowerCase();
|
||||||
if (
|
return (
|
||||||
Object.keys(schema.attributes)
|
Object.keys(schema.attributes)
|
||||||
.map((attributeName) => attributeName.toLowerCase())
|
.map((attributeName) => attributeName.toLowerCase())
|
||||||
.includes(findAttribute)
|
.includes(findAttribute)
|
||||||
) {
|
);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const convertFiltersQueryParams = (filters, schema) => {
|
const convertFiltersQueryParams = (filters, schema) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user