diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/input-dto.ts b/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/input-dto.ts index 46530ba..7a97709 100644 --- a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/input-dto.ts +++ b/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/input-dto.ts @@ -1,7 +1,7 @@ import { IsEnum, IsMobilePhone, IsOptional, IsString, IsUUID } from 'class-validator'; import { PaymentMethod } from '../../../../../../core/shared/interfaces/payments'; -export class UpdatePatientControllerReqBodyInputDto { +export class UpdatePatientControllerBodyInputDto { @IsOptional() @IsString() name?: string; @@ -27,7 +27,7 @@ export class UpdatePatientControllerReqBodyInputDto { clinicId?: string; } -export class UpdatePatientControllerReqParamsInputDto { +export class UpdatePatientControllerParamsInputDto { @IsUUID() id!: string; } diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/update-patient.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/update-patient.controller.ts index ef38cdf..cdbca93 100644 --- a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/update-patient.controller.ts +++ b/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/patient/update-patient/update-patient.controller.ts @@ -4,8 +4,8 @@ import { patchMethodDocs } from './docs'; import { GlobalAppHttpException } from '../../../../../../shared/errors/globalAppHttpException'; import { - UpdatePatientControllerReqBodyInputDto, - UpdatePatientControllerReqParamsInputDto, + UpdatePatientControllerBodyInputDto, + UpdatePatientControllerParamsInputDto, } from './input-dto'; import { NestjsUpdatePatientService } from './nestjs-update-patient.service'; import { UpdatePatientControllerOutputDto } from './output.dto'; @@ -21,8 +21,8 @@ export class UpdatePatientController { @Patch(':id/update') @ApiOperation(patchMethodDocs) async execute( - @Param() { id }: UpdatePatientControllerReqParamsInputDto, - @Body() updatePsychologistDto: UpdatePatientControllerReqBodyInputDto, + @Param() { id }: UpdatePatientControllerParamsInputDto, + @Body() updatePsychologistDto: UpdatePatientControllerBodyInputDto, ): Promise { try { const isReqBodyEmpty = Object.keys(updatePsychologistDto).length === 0; diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/authenticate-psychologist.controller.ts b/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/authenticate-psychologist.controller.ts index f535e83..5bfb25a 100644 --- a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/authenticate-psychologist.controller.ts +++ b/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/authenticate-psychologist.controller.ts @@ -5,7 +5,7 @@ import { Encrypter } from '../../../../../../core/shared/cryptography/repository import { GlobalAppHttpException } from '../../../../../../shared/errors/globalAppHttpException'; import { Public } from '../../../../../auth/public'; -import { AuthenticatePsychologistControllerInputDto } from './input.dto'; +import { ControllerBodyInputDto } from './input.dto'; import { NestjsAuthenticatePsychologistService } from './nestjs-authenticate-psychologist.service'; import { AuthenticatePsychologistControllerOutputDto } from './output.dto'; @@ -22,7 +22,7 @@ export class AuthenticatePsychologistController { @Post('login') @Public() async execute( - @Body() psychologistLoginDto: AuthenticatePsychologistControllerInputDto, + @Body() psychologistLoginDto: ControllerBodyInputDto, ): Promise { try { const { id, name, email } = diff --git a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/input.dto.ts b/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/input.dto.ts index 689b42d..ae5e83a 100644 --- a/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/input.dto.ts +++ b/apps/core-rest-api/src/app/adapters/controllers/api/use-cases/psychologist/authenticate-psychologist/input.dto.ts @@ -1,6 +1,6 @@ import { IsString } from 'class-validator'; -export class AuthenticatePsychologistControllerInputDto { +export class ControllerBodyInputDto { @IsString() email!: string;