mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 02:03:39 +00:00
collection externalId
This commit is contained in:
@@ -5,11 +5,13 @@ export class Collection {
|
||||
const req = new Collection();
|
||||
req.organizationId = '00000000-0000-0000-0000-000000000000';
|
||||
req.name = 'Collection name';
|
||||
req.externalId = null;
|
||||
return req;
|
||||
}
|
||||
|
||||
static toView(req: Collection, view = new CollectionView()) {
|
||||
view.name = req.name;
|
||||
view.externalId = req.externalId;
|
||||
if (view.organizationId == null) {
|
||||
view.organizationId = req.organizationId;
|
||||
}
|
||||
@@ -18,10 +20,12 @@ export class Collection {
|
||||
|
||||
organizationId: string;
|
||||
name: string;
|
||||
externalId: string;
|
||||
|
||||
// Use build method instead of ctor so that we can control order of JSON stringify for pretty print
|
||||
build(o: CollectionView) {
|
||||
this.organizationId = o.organizationId;
|
||||
this.name = o.name;
|
||||
this.externalId = o.externalId;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user