hi
if anyone could help me with my nodejs Script service
on Dreamfactory 2.2
imagine following script
var lodash = require(“/usr/local/lib/node_modules/lodash”);
var api = new mangopay({
clientId: ‘myID’,clientPassword: 'mypass', baseUrl: 'https://api.sandbox.mangopay.com'
});
api.Users.create({
Tag: “tag”,
FirstName: “fname”,
LastName: “lname”,
Birthday: 1463496101,
Nationality: “FR”,
CountryOfResidence: ‘FR’,Email: 'myemail@myemail.com', PersonType: "NATURAL",
}, function(myOtherUser) {
return myOtherUser // This doesnt display anything
}
return “test” // return test → so ok here
it seems that the return inside the myOtherUser function doesn’t display/return value
even with a return “thisisatest”
the only return that works is outside any function.
so how could i pass myOtherUser value outside the function ?
same script in a .js file run form a bash display return myOtherUser …
thanks