From c42a45e9675c1f32cb68c25786af58560e79fd2c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 13 Jun 2018 14:08:28 -0400 Subject: [PATCH] cipher with id for bulk share request --- src/models/request/cipherBulkShareRequest.ts | 6 +++--- src/models/request/cipherWithIdRequest.ts | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 src/models/request/cipherWithIdRequest.ts diff --git a/src/models/request/cipherBulkShareRequest.ts b/src/models/request/cipherBulkShareRequest.ts index a4dede2875..413212e1ae 100644 --- a/src/models/request/cipherBulkShareRequest.ts +++ b/src/models/request/cipherBulkShareRequest.ts @@ -1,16 +1,16 @@ -import { CipherRequest } from './cipherRequest'; +import { CipherWithIdRequest } from './cipherWithIdRequest'; import { Cipher } from '../domain/cipher'; export class CipherBulkShareRequest { - ciphers: CipherRequest[]; + ciphers: CipherWithIdRequest[]; collectionIds: string[]; constructor(ciphers: Cipher[], collectionIds: string[]) { if (ciphers != null) { this.ciphers = []; ciphers.forEach((c) => { - this.ciphers.push(new CipherRequest(c)); + this.ciphers.push(new CipherWithIdRequest(c)); }); } this.collectionIds = collectionIds; diff --git a/src/models/request/cipherWithIdRequest.ts b/src/models/request/cipherWithIdRequest.ts new file mode 100644 index 0000000000..a3d5e9d808 --- /dev/null +++ b/src/models/request/cipherWithIdRequest.ts @@ -0,0 +1,12 @@ +import { CipherRequest } from './cipherRequest'; + +import { Cipher } from '../domain/cipher'; + +export class CipherWithIdRequest extends CipherRequest { + id: string; + + constructor(cipher: Cipher) { + super(cipher); + this.id = cipher.id; + } +}