clients/src/commands/login.command.ts
2018-05-13 00:19:14 -04:00

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