mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
move from login to cipher apis
This commit is contained in:
@@ -22,27 +22,12 @@ var LoginData = function (response, userId) {
|
||||
this.userId = userId;
|
||||
this.edit = response.edit;
|
||||
this.organizationUseTotp = response.organizationUseTotp;
|
||||
|
||||
if (response instanceof LoginResponse) {
|
||||
this.name = response.name;
|
||||
this.uri = response.uri;
|
||||
this.username = response.username;
|
||||
this.password = response.password;
|
||||
this.notes = response.notes;
|
||||
this.totp = response.totp;
|
||||
}
|
||||
else if (response instanceof CipherResponse) {
|
||||
this.name = response.data.Name;
|
||||
this.uri = response.data.Uri;
|
||||
this.username = response.data.Username;
|
||||
this.password = response.data.Password;
|
||||
this.notes = response.notes = response.data.Notes;
|
||||
this.totp = response.notes = response.data.Totp;
|
||||
}
|
||||
else {
|
||||
throw 'unsupported instance';
|
||||
}
|
||||
|
||||
this.name = response.data.Name;
|
||||
this.uri = response.data.Uri;
|
||||
this.username = response.data.Username;
|
||||
this.password = response.data.Password;
|
||||
this.notes = response.notes = response.data.Notes;
|
||||
this.totp = response.notes = response.data.Totp;
|
||||
this.favorite = response.favorite;
|
||||
this.revisionDate = response.revisionDate;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user