Skip to content

Commit

Permalink
Merge branch 'develop' into task/rename_business
Browse files Browse the repository at this point in the history
  • Loading branch information
codyseibert committed Dec 4, 2018
2 parents f0ac4fd + 47ef5dc commit 23704ae
Show file tree
Hide file tree
Showing 60 changed files with 2,115 additions and 646 deletions.
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.DS_Store
.scannerwork/
.terraform/
web-client/cypress/screenshots
web-client/node_modules
shared/coverage
shared/node_modules
.DS_Store
web-client/cypress/screenshots
web-client/node_modules
web-client/reports
web-client/tests_output/
20 changes: 17 additions & 3 deletions efcms-service/create-dynamo-tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,22 @@ const dynamo = new AWS.DynamoDB({
endpoint: 'http://localhost:8000',
});

const createDocumentsTable = () => {
const deleteTable = async tableName => {
try {
return await dynamo
.deleteTable({
TableName: tableName,
})
.promise();
} catch (error) {
// ResourceNotFoundException
return Promise.resolve();
}
};
const createDocumentsTable = async () => {
await deleteTable('efcms-documents-local');
console.log('Creating Documents Table');
dynamo
return dynamo
.createTable({
TableName: 'efcms-documents-local',
KeySchema: [
Expand All @@ -30,8 +43,9 @@ const createDocumentsTable = () => {
.promise();
};

const createCasesTable = () => {
const createCasesTable = async () => {
console.log('Creating Cases Table');
await deleteTable('efcms-cases-local');
return dynamo
.createTable({
TableName: 'efcms-cases-local',
Expand Down
Loading

0 comments on commit 23704ae

Please sign in to comment.