1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

cli response objects

This commit is contained in:
Kyle Spearrin
2018-05-14 14:54:19 -04:00
parent 3dd38cbe12
commit 4f3f84539d
13 changed files with 203 additions and 58 deletions

View File

@@ -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());
}
}
}