source-code/
portofolio-backend
Public
typescript21 lines580 B
import { Controller, Post, Body } from '@nestjs/common';
import { AuthService } from './auth.service';
import { LoginDto } from './dto/login.dto';
/**
* Controller for handling authentication-related requests.
*/
@Controller('auth')
export class AuthController {
constructor(private readonly authService: AuthService) {}
/**
* Authenticates a user and returns a JWT token.
* Expects email and password in the request body.
*/
@Post('login')
async login(@Body() loginDto: LoginDto) {
return this.authService.login(loginDto.email, loginDto.password);
}
}
About
Fullstack portfolio backend built with NestJS, Prisma, and PostgreSQL. Features JWT authentication, throttler rate limits, cache management, and automated GitHub repository synchronization.
linknre.codes
TypeScriptNestJSPostgreSQLPrisma