(param, callback)
| 49 | * @param callback handles the response |
| 50 | */ |
| 51 | var putItem = function (param, callback) { |
| 52 | try { |
| 53 | dynamo.putItem (param, function (err, data) { |
| 54 | if (!err) { |
| 55 | console.log('write executed successfully'); |
| 56 | if (typeof(callback) === 'function') { |
| 57 | callback(data); |
| 58 | } |
| 59 | } else { |
| 60 | throw (err); |
| 61 | } |
| 62 | }); |
| 63 | } |
| 64 | catch (err) { |
| 65 | console.log('error in updating the data' + err); |
| 66 | } |
| 67 | }; |
| 68 | |
| 69 | /** |
| 70 | * |
nothing calls this directly
no test coverage detected