/opt/mawid/apps/api/src/auth
NameSizeModeActions
auth.controller.ts9110644editdlrm
auth.module.ts7330644editdlrm
auth.service.spec.ts31530644editdlrm
auth.service.ts20470644editdlrm
current-user.decorator.ts5310644editdlrm
jwt-auth.guard.ts11000644editdlrm
public.decorator.ts1500644editdlrm
Edit: /opt/mawid/apps/api/src/auth/auth.controller.ts (911B)
import { Body, Controller, Post } from '@nestjs/common'; import { Throttle } from '@nestjs/throttler'; import { loginSchema, registerSchema, type LoginInput, type RegisterInput, } from '@mawid/shared'; import { ZodValidationPipe } from '../common/zod-validation.pipe'; import { AuthService } from './auth.service'; import { Public } from './public.decorator'; // Brute-force protection: credential endpoints are tightly rate-limited. @Throttle({ default: { ttl: 60_000, limit: 10 } }) @Controller('auth') export class AuthController { constructor(private readonly authService: AuthService) {} @Public() @Post('register') register(@Body(new ZodValidationPipe(registerSchema)) body: RegisterInput) { return this.authService.register(body); } @Public() @Post('login') login(@Body(new ZodValidationPipe(loginSchema)) body: LoginInput) { return this.authService.login(body); } }