Skip to content

Commit

Permalink
fix(person): param name
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne-bechara committed Nov 12, 2024
1 parent 4b43ae0 commit f222756
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 71 deletions.
64 changes: 0 additions & 64 deletions source/person/person.dto.ts

This file was deleted.

14 changes: 7 additions & 7 deletions source/person/person.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { PersonDto } from '../cnpja/cnpja.dto';
import { PersonDto, PersonSearchDto } from '../cnpja/cnpja.dto';
import { HttpService } from '../http/http.service';
import { PersonSearchReadDto } from './person.dto';

export class PersonService {

Expand All @@ -13,12 +12,13 @@ export class PersonService {
* ### Consulta Pessoa
* Adquire os dados de uma pessoa incluindo todos os quadros societários que faz parte.
* @param params
* @param params.personId
*/
public read(params: Pick<PersonDto, 'id'>): Promise<PersonDto> {
const { id } = params;
public read(params: { personId: string }): Promise<PersonDto> {
const { personId } = params;

return this.httpService.get('person/:id', {
replacements: { id },
return this.httpService.get('person/:personId', {
replacements: { personId },
});
}

Expand All @@ -27,7 +27,7 @@ export class PersonService {
* Lista todas as pessoas que correspondem aos filtros configurados.
* @param params
*/
public async *search(params: PersonSearchReadDto): AsyncIterable<PersonDto[]> {
public async *search(params: PersonSearchDto): AsyncIterable<PersonDto[]> {
yield* this.httpService.getPage('person', { query: params });
}

Expand Down

0 comments on commit f222756

Please sign in to comment.