mirror of
https://github.com/strapi/strapi.git
synced 2025-07-23 17:10:08 +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) => {
|
||||
params.where = params.where || {};
|
||||
if (Array.isArray(params.where)) {
|
||||
params.where.push(whereClause);
|
||||
if (params.where.$and) {
|
||||
params.where.$and.push(whereClause);
|
||||
} else {
|
||||
params.where = [params.where, whereClause];
|
||||
params.where.$and = [whereClause];
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user