Guest User

Untitled

a guest
Dec 17th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. function setTheProps(appId, lastModifiedDate){
  2.  
  3. var jsonArr = [];
  4. jsonArr.push({
  5. modifiedDate: lastModifiedDate, //this is the modifiedDate retrieved from the app
  6. modifiedByUserName: "my\un",
  7. value: "Node C"
  8. });
  9.  
  10.  
  11. console.log(props);
  12. console.log(jsonArr);
  13.  
  14. trt.Put('/app/' + appId,
  15. {
  16. "modifiedDate": lastModifiedDate, // this is key, and is what's causing the 409 CONFLICT if missing
  17. "customProperties":
  18. jsonArr
  19.  
  20. },
  21. 'json'
  22. ).then(function(result)
  23. {
  24. console.log(result.body);
  25. })
  26. .catch(function(error)
  27. {
  28. console.log('node customProps error: ' +error);
  29. process.exit(0);
  30. });
  31. }
Add Comment
Please, Sign In to add comment