feat: connect UI texts, address CRUD, OTP autofocus and profile to backend

This commit is contained in:
parsa committed 2026-05-26 21:39:14 +03:30
1 parent 4e2c8d5cfe
commit 467532713c
82 files changed
+14436 -274

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import { Controller, Post, Body, HttpCode, HttpStatus } from '@nestjs/common';
import { AuthService } from './auth.service';
import { SendOtpDto } from './dto/send-otp.dto';
import { VerifyOtpDto } from './dto/verify-otp.dto';
import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';
@ApiTags('Auth')
@Controller('auth')
export class AuthController {
constructor(private readonly authService: AuthService) {}
@Post('send-otp')
@HttpCode(HttpStatus.OK)
@ApiOperation({ summary: 'ارسال کد تایید پیامکی' })
@ApiResponse({ status: 200, description: 'کد با موفقیت ارسال شد' })
sendOtp(@Body() sendOtpDto: SendOtpDto) {
return this.authService.sendOtp(sendOtpDto);
}
@Post('verify-otp')
@HttpCode(HttpStatus.OK)
@ApiOperation({ summary: 'تایید کد پیامکی و ورود/ثبت‌نام' })
@ApiResponse({ status: 200, description: 'ورود موفق به همراه توکن' })
verifyOtp(@Body() verifyOtpDto: VerifyOtpDto) {
return this.authService.verifyOtp(verifyOtpDto);
}
}