Skip to content
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.

Commit

Permalink
fix: remove error when return array empty
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielGuedess committed Jun 1, 2024
1 parent 34579c3 commit 4d491b1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ export class MaintenanceCompanyUseCases {
) {
const companies =
await this.maintenanceCompanyRepository.getAllMaintenanceCompany(request);
if (companies.length === 0)
throw new GraphQLError('ANY MAINTENANCE COMPANY FOUND', {
extensions: { code: HttpStatus.NOT_FOUND },
});

return companies;
}
Expand Down
4 changes: 0 additions & 4 deletions src/app/useCases/MaintenanceUseCase /MaintenanceUseCases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ export class MaintenanceUseCases {
const maintenances = await this.maintenanceRepository.findAllMaintenance(
request,
);
if (maintenances.length === 0)
throw new GraphQLError('ANY MAINTENANCE FOUND ', {
extensions: { code: HttpStatus.NOT_FOUND },
});

return maintenances;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class PhysicalCustomerOrderResolver {
);
}
@Mutation(() => PhysicalCustomerOrderModel)
async updatephysicalCustomerOrder(
async updatePhysicalCustomerOrder(
@Args('id') id: string,
@Args('physicalCustomerOrderInput')
physicalCustomerOrderInput: PhysicalCustomerOrderUpdateInput,
Expand Down

0 comments on commit 4d491b1

Please sign in to comment.