var AWS = require('aws-sdk')
var uuid = require('uuid')

var config = require('../config.json')
var encryption = require('../lib/encryption')

module.exports.put = function(form) {
  var docClient = new AWS.DynamoDB.DocumentClient()
  var payload = {
    id: uuid.v4(),
    data: encryption.encrypt(JSON.stringify(form))
  }
  return docClient.put({TableName: config.TABLE_NAME, Item: payload})
}

@@ -170,16 +170,26 @@
 ion(form
+, callback
 ) %7B%0A  va
@@ -396,12 +396,24 @@
 payload%7D
+, callback()
 )%0A%7D%0A

update receive database.js with callback