Skip to content

Commit

Permalink
fix(dynamodb): fix purge when key is number
Browse files Browse the repository at this point in the history
key values for types S, N & B always need to be of type string no matter of the actual type

Refs: #7
  • Loading branch information
iwt-matthiasrohmer committed Mar 15, 2021
1 parent 4cc5755 commit d423c59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/dynamodb/src/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const convertItemToKey = (item: any, keySchema: KeySchema) => {
Object.keys(keySchema).forEach((keyName) => {
const type = keySchema[keyName];
key[keyName] = {};
key[keyName][type] = item[keyName];
key[keyName][type] = String(item[keyName]);
});
return key;
};

0 comments on commit d423c59

Please sign in to comment.