mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-01 01:19:07 +00:00
FIX: updated protospack lib
This commit is contained in:
@@ -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