15 lines
436 B
TypeScript
15 lines
436 B
TypeScript
import { Controller } from '@nestjs/common';
|
|
import { AuthService } from './auth.service';
|
|
import { MessagePattern } from '@nestjs/microservices';
|
|
import { LoginRequest } from './interfaces/auth.interface';
|
|
|
|
@Controller()
|
|
export class AuthController {
|
|
constructor(private readonly authService: AuthService) {}
|
|
|
|
@MessagePattern('auth.login')
|
|
login({ body }: { body: LoginRequest }) {
|
|
return this.authService.login(body);
|
|
}
|
|
}
|