Add to the Circuit
Remove to the Circuit Revoke request Users Admins
This commit is contained in:
@@ -41,12 +41,16 @@ const AccountSchema = new Schema({
|
||||
saldo: {
|
||||
type: Number,
|
||||
},
|
||||
deleted: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
AccountSchema.statics.findAllIdApp = async function(idapp) {
|
||||
const Account = this;
|
||||
|
||||
const myfind = {idapp};
|
||||
const myfind = {idapp, deleted: false};
|
||||
|
||||
return await Account.find(myfind, (err, arrrec) => {
|
||||
return arrrec;
|
||||
@@ -79,7 +83,7 @@ AccountSchema.statics.getFieldsForSearch = function() {
|
||||
|
||||
AccountSchema.statics.executeQueryTable = function(idapp, params) {
|
||||
params.fieldsearch = this.getFieldsForSearch();
|
||||
return tools.executeQueryTable(this, 0, params);
|
||||
return tools.executeQueryTable(this, idapp, params);
|
||||
};
|
||||
|
||||
AccountSchema.statics.getAccountsByUsername = async function(idapp, username) {
|
||||
@@ -93,7 +97,7 @@ AccountSchema.statics.getAccountsByUsername = async function(idapp, username) {
|
||||
'username': username,
|
||||
};
|
||||
|
||||
return await Account.find(myquery);
|
||||
return await Account.find(myquery).lean();
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user