mirror of
https://github.com/strapi/strapi.git
synced 2025-07-25 09:56:53 +00:00
use where.
This commit is contained in:
parent
9d23799b5d
commit
c0239cd68c
@ -10,10 +10,10 @@ const { validateFindAvailable } = require('./validation/relations');
|
|||||||
|
|
||||||
const addWhereClause = (params, whereClause) => {
|
const addWhereClause = (params, whereClause) => {
|
||||||
params.where = params.where || {};
|
params.where = params.where || {};
|
||||||
if (Array.isArray(params.where)) {
|
if (params.where.$and) {
|
||||||
params.where.push(whereClause);
|
params.where.$and.push(whereClause);
|
||||||
} else {
|
} else {
|
||||||
params.where = [params.where, whereClause];
|
params.where.$and = [whereClause];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user