Skip to content
This repository has been archived by the owner on Nov 17, 2024. It is now read-only.

Commit

Permalink
fix(action): properly map PRIVATE_KEYS_REFRESH_INTERVAL_IN_DAYS env p…
Browse files Browse the repository at this point in the history
…arameter from string to int
  • Loading branch information
El-Fitz committed Aug 23, 2024
1 parent 71b0987 commit 7727b26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@csbnlu/jawks-private-keys-provisioner",
"version": "0.0.16",
"version": "0.0.17",
"devDependencies": {
"@types/aws-lambda": "^8.10.143",
"@types/luxon": "^3.4.2",
Expand Down
7 changes: 6 additions & 1 deletion src/bin/provision-private-keys.mts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ const environmentConfigSchema = z.object({
if (value === undefined) {
return undefined;
}
return parseInt(value);
const parsedValue = parseInt(value);
if (isNaN(parsedValue)) {
console.error("Invalid privateKeysRefreshIntervalInDays");
return undefined;
}
return parsedValue;
}),
});

Expand Down

0 comments on commit 7727b26

Please sign in to comment.