Skip to content

Commit

Permalink
fix(shared): allow unprefixed query keys
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Aug 26, 2024
1 parent 89e72ea commit dcbec3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/shared/src/dynamo/dynamo.config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class ConfigDynamoBase<T extends BaseConfig = BaseConfig> extends Basemap
/** Ensure the ID is prefixed before querying */
ensureId(id: string): string {
if (id.startsWith(this.prefix + '_')) return id;
throw new Error(`Trying to query "${id}" expected prefix of ${this.prefix}`);
return `${this.prefix}_${id}`;
}

private get db(): DynamoDB {
Expand Down

0 comments on commit dcbec3c

Please sign in to comment.