User search and creation
This commit is contained in:
parent
5fa9e6efd6
commit
0458e11267
7 changed files with 109 additions and 42 deletions
|
@ -43,6 +43,7 @@ class DBManagement {
|
|||
let RESULT = [];
|
||||
|
||||
if ((CRITERIA && CRITERIA instanceof Object) ? !(Object.keys(CRITERIA).length) : true) {
|
||||
console.log(`Searching all...`);
|
||||
RESULT = await this.model.find();
|
||||
} else if (CRITERIA instanceof Object) {
|
||||
RESULT = await this.model.find(CRITERIA);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue