1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-19 02:51:14 +02:00

Remove unused toData methods (#245)

This commit is contained in:
Matt Gibson 2021-01-11 10:51:23 -06:00 committed by GitHub
parent cea09a22e5
commit 3ac42f2f44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 55 deletions

View File

@ -103,38 +103,4 @@ export class Send extends Domain {
return model;
}
toSendData(userId: string): SendData {
const s = new SendData();
s.id = this.id;
s.accessId = this.accessId;
s.userId = userId;
s.maxAccessCount = this.maxAccessCount;
s.accessCount = this.accessCount;
s.disabled = this.disabled;
s.password = this.password;
s.revisionDate = this.revisionDate != null ? this.revisionDate.toISOString() : null;
s.deletionDate = this.deletionDate != null ? this.deletionDate.toISOString() : null;
s.expirationDate = this.expirationDate != null ? this.expirationDate.toISOString() : null;
s.type = this.type;
this.buildDataModel(this, s, {
name: null,
notes: null,
key: null,
});
switch (s.type) {
case SendType.File:
s.text = this.text.toSendTextData();
break;
case SendType.Text:
s.file = this.file.toSendFileData();
break;
default:
break;
}
return s;
}
}

View File

@ -34,16 +34,4 @@ export class SendFile extends Domain {
}, null, key);
return view;
}
toSendFileData(): SendFileData {
const f = new SendFileData();
f.size = this.size;
this.buildDataModel(this, f, {
id: null,
url: null,
sizeName: null,
fileName: null,
}, ['id', 'url', 'sizeName']);
return f;
}
}

View File

@ -27,13 +27,4 @@ export class SendText extends Domain {
text: null,
}, null, key);
}
toSendTextData(): SendTextData {
const t = new SendTextData();
this.buildDataModel(this, t, {
text: null,
hidden: null,
}, ['hidden']);
return t;
}
}