Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. const putObj = Bluebird.promisify(docClient.put, { context: docClient })
  2.  
  3. // ... a promise chain collecting information...
  4. const params = {
  5. TableName: 'my_table',
  6. Item: {
  7. name: itemName
  8. }
  9. }
  10. return putObj(params)
  11. .then((data) => {
  12. if (Ramda.equals(data, {})) {
  13. // ... send notification here
  14. .catch((err) => {
  15. throw err
  16. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement