mirror of
https://github.com/bitwarden/clients.git
synced 2026-07-10 21:03:56 +08:00
21 lines
513 B
TypeScript
21 lines
513 B
TypeScript
import * as program from 'commander';
|
|
|
|
import { AuthResult } from 'jslib/models/domain/authResult';
|
|
|
|
import { AuthService } from 'jslib/abstractions/auth.service';
|
|
|
|
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);
|
|
} catch (e) {
|
|
console.log(e);
|
|
}
|
|
}
|
|
}
|