Superalgos Network: Query User Profiles debugged

This commit is contained in:
Luis Fernando Molina committed 2021-09-03 12:23:42 +02:00
1 parent 2645df775e
commit 67ec986422
13 files changed
+266 -227

No files matched your search

@@ -43,7 +43,7 @@ exports.newSocialTradingUtilitiesQueriesValidations = function newSocialTradingU
}
}
function arrayValidations(queryReceived, thisObject) {
function arrayValidations(queryReceived, thisObject, array) {
/*
Validate Initial Index
*/
@@ -52,7 +52,7 @@ exports.newSocialTradingUtilitiesQueriesValidations = function newSocialTradingU
}
if (queryReceived.initialIndex === NT.projects.socialTrading.globals.queryConstants.INITIAL_INDEX_LAST) {
queryReceived.initialIndex = thisObject.profile.posts.length - 1
queryReceived.initialIndex = array.length - 1
}
if (queryReceived.initialIndex === NT.projects.socialTrading.globals.queryConstants.INITIAL_INDEX_FIRST) {
@@ -82,6 +82,8 @@ exports.newSocialTradingUtilitiesQueriesValidations = function newSocialTradingU
if (queryReceived.amountRequested > NT.projects.socialTrading.globals.queryConstants.MAX_AMOUNT_REQUESTED) {
throw ('Amount Requested Above Max.')
}
thisObject.amountRequested = queryReceived.amountRequested
/*
Validate Direction
*/