1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

cipher with id for bulk share request

This commit is contained in:
Kyle Spearrin 2018-06-13 14:08:28 -04:00
parent 149ae8a59c
commit c42a45e967
2 changed files with 15 additions and 3 deletions

View File

@ -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;

View File

@ -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;
}
}