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:
parent
149ae8a59c
commit
c42a45e967
@ -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;
|
||||
|
12
src/models/request/cipherWithIdRequest.ts
Normal file
12
src/models/request/cipherWithIdRequest.ts
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user