mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
refactor for login uris and response model changes
This commit is contained in:
21
src/models/api/loginApi.ts
Normal file
21
src/models/api/loginApi.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { LoginUriApi } from './loginUriApi';
|
||||
|
||||
export class LoginApi {
|
||||
uris: LoginUriApi[];
|
||||
username: string;
|
||||
password: string;
|
||||
totp: string;
|
||||
|
||||
constructor(data: any) {
|
||||
this.username = data.Username;
|
||||
this.password = data.Password;
|
||||
this.totp = data.Totp;
|
||||
|
||||
if (data.Uris) {
|
||||
this.uris = [];
|
||||
data.Uris.forEach((u: any) => {
|
||||
this.uris.push(new LoginUriApi(u));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user