style: apply standard ESLint & Prettier formatting across backend
Deploy Canina / deploy (push) Successful in 4m58s

This commit is contained in:
parsa aghaei committed 2026-07-29 15:41:53 +03:30
1 parent ae636c8b03
commit 62bd8811fa
66 files changed
+1398 -607

No files matched your search

+28 -20
View File
@@ -4,7 +4,13 @@ import { SendOtpDto } from './dto/send-otp.dto';
import { VerifyOtpDto } from './dto/verify-otp.dto';
import { RegisterDto } from './dto/register.dto';
import { LoginDto } from './dto/login.dto';
import { ApiTags, ApiOperation, ApiResponse, ApiOkResponse, ApiBadRequestResponse } from '@nestjs/swagger';
import {
ApiTags,
ApiOperation,
ApiResponse,
ApiOkResponse,
ApiBadRequestResponse,
} from '@nestjs/swagger';
@ApiTags('Auth - احراز هویت')
@Controller('auth')
@@ -16,9 +22,9 @@ import { ApiTags, ApiOperation, ApiResponse, ApiOkResponse, ApiBadRequestRespons
success: false,
message: 'خطای ناشناخته در سرور رخ داده است',
code: 'SERVER_ERROR',
details: {}
}
}
details: {},
},
},
})
export class AuthController {
constructor(private readonly authService: AuthService) {}
@@ -32,9 +38,9 @@ export class AuthController {
example: {
success: true,
message: 'کد تایید ارسال شد',
code: '12345'
}
}
code: '12345',
},
},
})
@ApiBadRequestResponse({
description: 'فرمت شماره تلفن همراه نامعتبر است',
@@ -44,10 +50,10 @@ export class AuthController {
message: 'شماره موبایل نامعتبر است',
code: 'BAD_REQUEST',
details: {
message: ['شماره موبایل نامعتبر است']
}
}
}
message: ['شماره موبایل نامعتبر است'],
},
},
},
})
sendOtp(@Body() sendOtpDto: SendOtpDto) {
return this.authService.sendOtp(sendOtpDto);
@@ -72,12 +78,12 @@ export class AuthController {
walletBalance: '0.00',
charityDonationTotal: '0.00',
createdAt: '2026-05-26T15:20:00.000Z',
updatedAt: '2026-05-26T15:20:00.000Z'
updatedAt: '2026-05-26T15:20:00.000Z',
},
accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
}
}
}
accessToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
},
},
},
})
@ApiBadRequestResponse({
description: 'کد تایید اشتباه یا منقضی شده است',
@@ -86,9 +92,9 @@ export class AuthController {
success: false,
message: 'کد تایید اشتباه است',
code: 'OTP_INVALID',
details: {}
}
}
details: {},
},
},
})
verifyOtp(@Body() verifyOtpDto: VerifyOtpDto) {
return this.authService.verifyOtp(verifyOtpDto);
@@ -98,7 +104,9 @@ export class AuthController {
@HttpCode(HttpStatus.CREATED)
@ApiOperation({ summary: 'ثبت‌نام با ایمیل/موبایل و رمز عبور' })
@ApiOkResponse({ description: 'کاربر با موفقیت ثبت‌نام شد' })
@ApiBadRequestResponse({ description: 'اطلاعات ثبت‌نام نامعتبر است یا کاربر از قبل وجود دارد' })
@ApiBadRequestResponse({
description: 'اطلاعات ثبت‌نام نامعتبر است یا کاربر از قبل وجود دارد',
})
register(@Body() registerDto: RegisterDto) {
return this.authService.register(registerDto);
}