Hi,
aws-node-rest-api-with-dynamodb example comes with one attribute. has anyone extended it to include more attributes? I added a new field - intent. but it is not working. Thanks for your help.
if (typeof data.text !== 'string') {
console.error('Validation Failed');
callback(new Error('Couldn\'t create the flowstat item.'));
return;
}
if (typeof data.intent !== 'string') {
console.error('Validation Failed');
callback(new Error('Couldn\'t create the flowstat item.'));
return;
}
const params = {
TableName: process.env.DYNAMODB_TABLE,
Item: {
id: uuid.v1(),
text: data.text,
intent: data.intent,
checked: false,
createdAt: timestamp,
updatedAt: timestamp,