mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
cli response objects
This commit is contained in:
@@ -4,17 +4,18 @@ import { AuthResult } from 'jslib/models/domain/authResult';
|
||||
|
||||
import { AuthService } from 'jslib/abstractions/auth.service';
|
||||
|
||||
export class LoginCommand {
|
||||
constructor(private authService: AuthService) {
|
||||
import { Response } from '../models/response';
|
||||
|
||||
}
|
||||
export class LoginCommand {
|
||||
constructor(private authService: AuthService) { }
|
||||
|
||||
async run(email: string, password: string, cmd: program.Command) {
|
||||
try {
|
||||
const result = await this.authService.logIn(email, password);
|
||||
console.log(result);
|
||||
// TODO: 2FA
|
||||
return Response.success();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
return Response.success(e.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user