19 lines
462 B
TypeScript
19 lines
462 B
TypeScript
import { Body, Controller, Inject, Post } from "@nestjs/common";
|
|
import type { LoginInput } from "../../dtos/auth.dto.js";
|
|
import {
|
|
AUTH_SERVICE,
|
|
type IAuthService,
|
|
} from "./interfaces/auth-service.interface.js";
|
|
|
|
@Controller("auth")
|
|
export class AuthController {
|
|
constructor(
|
|
@Inject(AUTH_SERVICE) private readonly authService: IAuthService,
|
|
) {}
|
|
|
|
@Post("login")
|
|
login(@Body() body: LoginInput) {
|
|
return this.authService.login(body);
|
|
}
|
|
}
|