mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 02:33:46 +00:00
Simplify send templates (#237)
* Simplify Send templates * Fix internal template reference * No trailing whitespace
This commit is contained in:
@@ -14,13 +14,13 @@ const dateProperties: string[] = [Utils.nameOf<SendResponse>('deletionDate'), Ut
|
||||
|
||||
export class SendResponse implements BaseResponse {
|
||||
|
||||
static template(deleteInDays = 7): SendResponse {
|
||||
static template(sendType?: SendType, deleteInDays = 7): SendResponse {
|
||||
const req = new SendResponse();
|
||||
req.name = 'Send name';
|
||||
req.notes = 'Some notes about this send.';
|
||||
req.type = SendType.Text;
|
||||
req.text = null;
|
||||
req.file = null;
|
||||
req.text = sendType === SendType.Text ? SendTextResponse.template() : null;
|
||||
req.file = sendType === SendType.File ? SendFileResponse.template() : null;
|
||||
req.maxAccessCount = null;
|
||||
req.deletionDate = this.getStandardDeletionDate(deleteInDays);
|
||||
req.expirationDate = null;
|
||||
|
||||
Reference in New Issue
Block a user