mirror of
https://github.com/strapi/strapi.git
synced 2025-08-08 08:46:42 +00:00
15 lines
267 B
JavaScript
15 lines
267 B
JavaScript
'use strict';
|
|
|
|
const findModelByAssoc = ({ assoc }) => {
|
|
return strapi.db.getModelByAssoc(assoc);
|
|
};
|
|
|
|
const isPolymorphic = ({ assoc }) => {
|
|
return assoc.nature.toLowerCase().indexOf('morph') !== -1;
|
|
};
|
|
|
|
module.exports = {
|
|
findModelByAssoc,
|
|
isPolymorphic,
|
|
};
|