mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-20 07:09:09 +00:00
FIX: updated protospack lib
This commit is contained in:
@@ -20,11 +20,11 @@ export class AuthClientService implements OnModuleInit {
|
||||
);
|
||||
}
|
||||
|
||||
async signIn({ username, password }: ILogin): Promise<any> {
|
||||
async signIn({ username, password, totp }: ILogin): Promise<any> {
|
||||
console.log('AuthClientService', 'SignIn');
|
||||
|
||||
const tokens = await new Promise((resolve, reject) => {
|
||||
this.authService.signIn({ username, password }).subscribe({
|
||||
this.authService.signIn({ username, password, totp }).subscribe({
|
||||
next(x) {
|
||||
resolve(x);
|
||||
},
|
||||
|
||||
Vendored
+1
@@ -1,4 +1,5 @@
|
||||
export interface ILogin {
|
||||
username: string;
|
||||
password: string;
|
||||
totp: string;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { AuthClientService } from 'src/clients/auth/client.service';
|
||||
interface ISignIn {
|
||||
username: string;
|
||||
password: string;
|
||||
totp: string;
|
||||
}
|
||||
|
||||
@Controller('auth')
|
||||
@@ -12,11 +13,11 @@ export class AuthController {
|
||||
constructor(private authClient: AuthClientService) {}
|
||||
|
||||
@Post()
|
||||
async signIn(@Body() { username, password }: ISignIn) {
|
||||
async signIn(@Body() { username, password, totp }: ISignIn) {
|
||||
console.log(`/auth`, 'SignIn');
|
||||
|
||||
const tokens = await this.authClient
|
||||
.signIn({ username, password })
|
||||
.signIn({ username, password, totp })
|
||||
.then((result) => result)
|
||||
.catch((err) => {
|
||||
throw new UnauthorizedException(err.message);
|
||||
|
||||
Reference in New Issue
Block a user