Superalgos Network: Query User Profiles debugged
This commit is contained in:
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
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user