Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. // ...
  2. const getModule = (config) => {
  3. const documentClient = new AWS.DynamoDB.DocumentClient(config)
  4.  
  5. return ({
  6. // ...
  7. setNewValue: (params, propName, value) =>
  8. documentClient
  9. .update({
  10. ...params,
  11. UpdateExpression: `set #value = :newValue`,
  12. ExpressionAttributeValues: {
  13. ':newValue': value
  14. },
  15. ExpressionAttributeNames: {
  16. '#value': propName
  17. }
  18. })
  19. .promise()
  20. })
  21. }
  22. // ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement