strapi-utils
Advanced tools
Comparing version 3.4.0 to 3.4.1
@@ -5,3 +5,3 @@ 'use strict'; | ||
* Converts the standard Strapi REST query params to a moe usable format for querying | ||
* You can read more here: https://strapi.io/documentation/3.0.0-beta.x/guides/filters.html | ||
* You can read more here: https://strapi.io/documentation/developer-docs/latest/content-api/parameters.html#filters | ||
*/ | ||
@@ -8,0 +8,0 @@ |
'use strict'; | ||
const { prop } = require('lodash/fp'); | ||
const MANY_RELATIONS = ['oneToMany', 'manyToMany', 'manyWay']; | ||
const RF_RELATIONS = ['oneToMany', 'manyToMany', 'manyWay', 'manyToOne', 'oneWay', 'oneToOne']; | ||
const getRelationalFields = modelDef => { | ||
return modelDef.associations.filter(a => RF_RELATIONS.includes(a.nature)).map(prop('alias')); | ||
}; | ||
module.exports = { | ||
getRelationalFields, | ||
constants: { | ||
@@ -7,0 +15,0 @@ MANY_RELATIONS, |
{ | ||
"name": "strapi-utils", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"description": "Shared utilities for the Strapi packages", | ||
@@ -48,3 +48,3 @@ "homepage": "http://strapi.io", | ||
"license": "SEE LICENSE IN LICENSE", | ||
"gitHead": "ea636b4d31617659ea3ad567e679b35cfe940295" | ||
"gitHead": "8b9c3f2052ba449c653a9c4b90bdf09f98cf477d" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
105854
35
3125