diff --git a/src/commands/send/create.command.ts b/src/commands/send/create.command.ts index 219a8c4..4827b25 100644 --- a/src/commands/send/create.command.ts +++ b/src/commands/send/create.command.ts @@ -60,8 +60,10 @@ export class SendCreateCommand { const text = req.text?.text ?? options.text; const hidden = req.text?.hidden ?? options.hidden; const password = req.password ?? options.password; + const maxAccessCount = req.maxAccessCount ?? options.maxAccessCount; req.key = null; + req.maxAccessCount = maxAccessCount; switch (req.type) { case SendType.File: diff --git a/src/send.program.ts b/src/send.program.ts index e04fac2..6a77135 100644 --- a/src/send.program.ts +++ b/src/send.program.ts @@ -47,6 +47,7 @@ export class SendProgram extends Program { }) .option('-f, --file', 'Specifies that is a filepath') .option('-d, --deleteInDays ', 'The number of days in the future to set deletion date, defaults to 7', '7') + .option('-a, --maxAccessCount ', 'The amount of max possible accesses.') .option('--hidden', 'Hide in web by default. Valid only if --file is not set.') .option('-n, --name ', 'The name of the Send. Defaults to a guid for text Sends and the filename for files.') .option('--notes ', 'Notes to add to the Send.')