Skip to content

Commit

Permalink
adjust apis to not break compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
fscarponi committed Jul 26, 2024
1 parent ce58771 commit 9926f77
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ public class PackageSearchApiClient(
)

public suspend fun getPackageInfoByIdHashes(
idHashes: Set<String>,
requestBuilder: (HttpRequestBuilder.() -> Unit)? = null,
): Map<String, ApiPackage> = getPackageInfoByIdHashes(idHashes, true, requestBuilder)

private suspend fun getPackageInfoByIdHashes(
idHashes: Set<String>,
useHashes: Boolean = true,
requestBuilder: (HttpRequestBuilder.() -> Unit)? = null,
Expand Down Expand Up @@ -266,7 +271,7 @@ public class PackageSearchApiClient(
val resultIds = validResults.map { it.key }

val unresolvedIdentifiers =
idHashes - resultIds
idHashes - resultIds.toSet()

if (unresolvedIdentifiers.isEmpty()) {
return@coroutineScope validResults
Expand Down

0 comments on commit 9926f77

Please sign in to comment.