Criação dos endpoint's da tabela client
This commit is contained in:
parent
5a10ab79b7
commit
7da3fcc983
1 changed files with 7 additions and 4 deletions
|
|
@ -9,9 +9,9 @@ class IndexService:
|
|||
os clientes, delegando a busca para a Action correspondente.
|
||||
"""
|
||||
|
||||
# O método execute pode ser adaptado para receber 'first' e 'skip' se a Action/Repository suportar paginação.
|
||||
# No entanto, mantendo o padrão da assinatura do arquivo de referência, ele não recebe parâmetros aqui.
|
||||
def execute(self):
|
||||
# O método execute agora recebe 'first' e 'skip'
|
||||
def execute(self, first: int, skip: int) -> Tuple[List[Dict[str, Any]], int]:
|
||||
|
||||
"""
|
||||
Executa o serviço de listagem de clientes.
|
||||
|
||||
|
|
@ -21,6 +21,9 @@ class IndexService:
|
|||
# Instânciamento de ação
|
||||
index_action = IndexAction()
|
||||
|
||||
# Executa a busca de todos os logs com paginação
|
||||
data, total_records = index_action.execute(first, skip)
|
||||
|
||||
# Executa a busca de todos os clientes (a Action/Repository fará a busca, potencialmente com paginação)
|
||||
data = index_action.execute()
|
||||
|
||||
|
|
@ -33,4 +36,4 @@ class IndexService:
|
|||
)
|
||||
|
||||
# Retorna as informações localizadas
|
||||
return data
|
||||
return data, total_records
|
||||
Loading…
Add table
Reference in a new issue