(param, callback)
| 26 | * @param callback handles the response |
| 27 | */ |
| 28 | var getItem = function (param, callback) { |
| 29 | try { |
| 30 | dynamo.getItem(param, function (err, data) { |
| 31 | if (!err) { |
| 32 | console.log('get success'); |
| 33 | if (typeof(callback) === 'function') { |
| 34 | callback(data); |
| 35 | } |
| 36 | } else { |
| 37 | throw (err); |
| 38 | } |
| 39 | }); |
| 40 | } |
| 41 | catch (err) { |
| 42 | console.log('error in getting data' + err); |
| 43 | } |
| 44 | }; |
| 45 | |
| 46 | /** |
| 47 | * Creates a new Item or replaces an old item with a new item |
nothing calls this directly
no test coverage detected