filterServicesBy method

Future<DecryptedPaginatedListServiceDto?> filterServicesBy(
  1. UserDto user,
  2. FilterChain<ServiceDto> filterChain,
  3. String? startKey,
  4. String? startDocumentId,
  5. int? limit,
  6. Crypto crypto,
)

Implementation

Future<DecryptedPaginatedListServiceDto?> filterServicesBy(
    UserDto user, FilterChain<ServiceDto> filterChain, String? startKey, String? startDocumentId, int? limit, Crypto crypto) async {
  return await (await this.rawFilterServicesBy(filterChain, startDocumentId: startDocumentId, limit: limit))?.let((it) async =>
      DecryptedPaginatedListServiceDto(
          rows: await crypto.decryptServices(user.dataOwnerId()!, null, it.rows),
          pageSize: it.pageSize,
          totalSize: it.totalSize,
          nextKeyPair: it.nextKeyPair));
}