Skip to content

Commit

Permalink
Token expiration time in seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
skambalin committed Sep 12, 2024
1 parent eef0255 commit 4b2b4bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ yargs(hideBin(process.argv))
})
.option('expiresIn', {
type: 'number',
describe: 'Token expiration time in milliseconds',
describe: 'Token expiration time in seconds',
})
.option('signer', {
alias: 's',
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const createToken = async (options: TokenOptions) => {
prev: options.prev,
canDelegate: options.canDelegate,
subject: options.subject,
expiresIn: options.expiresIn,
expiresIn: options.expiresIn && options.expiresIn * 1000,
bucketId: options.bucketId ? BigInt(options.bucketId) : undefined,
operations: options.operations.map((op) => operationsMap[op]),
});
Expand Down

0 comments on commit 4b2b4bc

Please sign in to comment.