Improved site and network pages. Fixed various issues.
This commit is contained in:
11
src/utils/where-or.js
Normal file
11
src/utils/where-or.js
Normal file
@@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
function whereOr(query, builder) {
|
||||
Object.entries(query).forEach(([key, value]) => {
|
||||
if (value !== undefined) {
|
||||
builder.orWhere(`sites.${key}`, value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = whereOr;
|
||||
Reference in New Issue
Block a user