cipher with id for bulk share request
This commit is contained in:
parent
149ae8a59c
commit
c42a45e967
|
@ -1,16 +1,16 @@
|
||||||
import { CipherRequest } from './cipherRequest';
|
import { CipherWithIdRequest } from './cipherWithIdRequest';
|
||||||
|
|
||||||
import { Cipher } from '../domain/cipher';
|
import { Cipher } from '../domain/cipher';
|
||||||
|
|
||||||
export class CipherBulkShareRequest {
|
export class CipherBulkShareRequest {
|
||||||
ciphers: CipherRequest[];
|
ciphers: CipherWithIdRequest[];
|
||||||
collectionIds: string[];
|
collectionIds: string[];
|
||||||
|
|
||||||
constructor(ciphers: Cipher[], collectionIds: string[]) {
|
constructor(ciphers: Cipher[], collectionIds: string[]) {
|
||||||
if (ciphers != null) {
|
if (ciphers != null) {
|
||||||
this.ciphers = [];
|
this.ciphers = [];
|
||||||
ciphers.forEach((c) => {
|
ciphers.forEach((c) => {
|
||||||
this.ciphers.push(new CipherRequest(c));
|
this.ciphers.push(new CipherWithIdRequest(c));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.collectionIds = collectionIds;
|
this.collectionIds = collectionIds;
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue