From 5edd0a2c76e6461157b922adb607c186ff5bb2d2 Mon Sep 17 00:00:00 2001 From: Me <7854086+kkusch@users.noreply.github.com> Date: Tue, 11 May 2021 21:55:04 +0200 Subject: [PATCH] Add maxAccessCount to send command (#298) --- src/commands/send/create.command.ts | 2 ++ src/send.program.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/commands/send/create.command.ts b/src/commands/send/create.command.ts index 219a8c45b3..4827b25dbd 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 e04fac2d8f..6a77135c8b 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.')