test: comprehensive test suites and quality gates pass across backend, storefront and admin
- Backend (NestJS): 82 suites, 641 tests passing; 0 ESLint errors; 0 tsc errors. Hardened SSL cert/key matching, SSRF IP pinning, and eBank validation. - Admin Panel (Vite/React): 48 suites, 300 tests passing; 0 ESLint errors; 0 tsc errors. Full coverage across all pages and settings. - Storefront (Next.js): 62 suites, 368 tests passing; 0 ESLint errors; 0 tsc errors. - Fixed unmount lifecycle guards, promise error handling, and component edge cases.
This commit is contained in:
1 parent
1e73715169
commit
ddbf1ca026
439 files changed
+32911
-6107
No files matched your search
@@ -8,59 +8,59 @@ import {
|
||||
Param,
|
||||
Query,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { ApiTags, ApiOperation, ApiBearerAuth } from '@nestjs/swagger';
|
||||
import { DoctorsService } from './doctors.service';
|
||||
import { DoctorQueryDto } from './dto/doctor-query.dto';
|
||||
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
|
||||
import { RolesGuard } from '../common/guards/roles.guard';
|
||||
import { Roles } from '../common/decorators/roles.decorator';
|
||||
import { Prisma } from '@prisma/client';
|
||||
} from "@nestjs/common";
|
||||
import { ApiTags, ApiOperation, ApiBearerAuth } from "@nestjs/swagger";
|
||||
import { DoctorsService } from "./doctors.service";
|
||||
import { DoctorQueryDto } from "./dto/doctor-query.dto";
|
||||
import { JwtAuthGuard } from "../auth/jwt-auth.guard";
|
||||
import { RolesGuard } from "../common/guards/roles.guard";
|
||||
import { Roles } from "../common/decorators/roles.decorator";
|
||||
import { Prisma } from "@prisma/client";
|
||||
|
||||
@ApiTags('Doctors')
|
||||
@Controller('doctors')
|
||||
@ApiTags("Doctors")
|
||||
@Controller("doctors")
|
||||
export class DoctorsController {
|
||||
constructor(private readonly doctorsService: DoctorsService) {}
|
||||
|
||||
@Get()
|
||||
@ApiOperation({ summary: 'Get list of all doctors / specialists' })
|
||||
@ApiOperation({ summary: "Get list of all doctors / specialists" })
|
||||
findAll(@Query() query: DoctorQueryDto) {
|
||||
return this.doctorsService.findAll(query);
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
@ApiOperation({ summary: 'Get doctor by ID with their videos and CV' })
|
||||
findOne(@Param('id') id: string) {
|
||||
@Get(":id")
|
||||
@ApiOperation({ summary: "Get doctor by ID with their videos and CV" })
|
||||
findOne(@Param("id") id: string) {
|
||||
return this.doctorsService.findOne(id);
|
||||
}
|
||||
|
||||
@Post()
|
||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||
@Roles('Admin', 'ADMIN')
|
||||
@Roles("Admin", "ADMIN")
|
||||
@ApiBearerAuth()
|
||||
@ApiOperation({ summary: 'Create new doctor' })
|
||||
@ApiOperation({ summary: "Create new doctor" })
|
||||
create(@Body() createDoctorDto: Prisma.DoctorCreateInput) {
|
||||
return this.doctorsService.create(createDoctorDto);
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
@Put(":id")
|
||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||
@Roles('Admin', 'ADMIN')
|
||||
@Roles("Admin", "ADMIN")
|
||||
@ApiBearerAuth()
|
||||
@ApiOperation({ summary: 'Update doctor' })
|
||||
@ApiOperation({ summary: "Update doctor" })
|
||||
update(
|
||||
@Param('id') id: string,
|
||||
@Param("id") id: string,
|
||||
@Body() updateDoctorDto: Prisma.DoctorUpdateInput,
|
||||
) {
|
||||
return this.doctorsService.update(id, updateDoctorDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
@Delete(":id")
|
||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||
@Roles('Admin', 'ADMIN')
|
||||
@Roles("Admin", "ADMIN")
|
||||
@ApiBearerAuth()
|
||||
@ApiOperation({ summary: 'Delete doctor' })
|
||||
remove(@Param('id') id: string) {
|
||||
@ApiOperation({ summary: "Delete doctor" })
|
||||
remove(@Param("id") id: string) {
|
||||
return this.doctorsService.remove(id);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user