mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
move api services to background page. wire up log in and log out.
This commit is contained in:
@@ -12,9 +12,12 @@ var FolderRequest = function (folder) {
|
||||
this.name = folder.name ? folder.name.encryptedString : null;
|
||||
};
|
||||
|
||||
var TokenRequest = function () {
|
||||
this.email = null;
|
||||
this.masterPasswordHash = null;
|
||||
var TokenRequest = function (email, masterPasswordHash, device) {
|
||||
this.email = email;
|
||||
this.masterPasswordHash = masterPasswordHash;
|
||||
if (device) {
|
||||
this.device = new DeviceRequest(device);
|
||||
}
|
||||
this.device = null;
|
||||
};
|
||||
|
||||
|
||||
@@ -51,8 +51,9 @@ var ListResponse = function (data) {
|
||||
};
|
||||
|
||||
var ErrorResponse = function (response) {
|
||||
this.message = response.Message;
|
||||
this.validationErrors = response.ValidationErrors;
|
||||
this.message = response.responseJSON.Message;
|
||||
this.validationErrors = response.responseJSON.ValidationErrors;
|
||||
this.statusCode = response.status;
|
||||
};
|
||||
|
||||
var DeviceResponse = function (response) {
|
||||
|
||||
Reference in New Issue
Block a user