mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
attachments to models
This commit is contained in:
@@ -45,4 +45,19 @@ var LoginData = function (response, userId) {
|
||||
|
||||
this.favorite = response.favorite;
|
||||
this.revisionDate = response.revisionDate;
|
||||
|
||||
if (response.attachments) {
|
||||
this.attachments = [];
|
||||
for (var i = 0; i < response.attachments.length; i++) {
|
||||
this.attachments.push(new AttachmentData(response.attachments[i]));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var AttachmentData = function (response) {
|
||||
this.id = response.id;
|
||||
this.url = response.url;
|
||||
this.fileName = response.fileName;
|
||||
this.size = response.size;
|
||||
this.sizeName = response.sizeName;
|
||||
};
|
||||
Reference in New Issue
Block a user