Skip to content

Commit

Permalink
fix(DynamoStore): remove possibility to define region when initializi…
Browse files Browse the repository at this point in the history
…ng DynamoStore
  • Loading branch information
michaelwittwer committed Oct 5, 2017
1 parent 391632e commit e8028a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/dynamo/dynamo-rx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ export class DynamoRx {
// this.logger = new Logger(() => LogLevel.DEBUG, 'DynamoDbService');

// create the actual dynamo db client
if (awsRegion) {
this.dynamoDb = new DynamoDB()
} else {
this.dynamoDb = new DynamoDB({ region: awsRegion })
}
this.dynamoDb = new DynamoDB()
this.sessionValidityEnsurer = sessionValidityEnsurer
}

Expand Down
3 changes: 1 addition & 2 deletions src/dynamo/dynamo-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ export class DynamoStore<T> {

constructor(
private modelClazz: ModelConstructor<T>,
awsRegion?: string,
tableNameResolver: TableNameResolver = DEFAULT_TABLE_NAME_RESOLVER,
sessionValidityEnsurer: SessionValidityEnsurer = DEFAULT_SESSION_VALIDITY_ENSURER
) {
this.dynamoRx = new DynamoRx(sessionValidityEnsurer, awsRegion)
this.dynamoRx = new DynamoRx(sessionValidityEnsurer)
this.tableName = tableNameResolver(MetadataHelper.get(this.modelClazz).modelOptions.tableName)
}

Expand Down

0 comments on commit e8028a9

Please sign in to comment.