Skip to content

Commit

Permalink
feat: conan search接口当查询内容不存在时返回200 #2804
Browse files Browse the repository at this point in the history
  • Loading branch information
zacYL authored Nov 28, 2024
1 parent 6176070 commit ac962c0
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@

package com.tencent.bkrepo.conan.service.impl

import com.tencent.bkrepo.common.api.constant.StringPool
import com.tencent.bkrepo.common.metadata.service.packages.PackageService
import com.tencent.bkrepo.conan.constant.ConanMessageCode
import com.tencent.bkrepo.conan.exception.ConanSearchNotFoundException
import com.tencent.bkrepo.conan.pojo.ConanInfo
import com.tencent.bkrepo.conan.pojo.ConanSearchResult
import com.tencent.bkrepo.conan.pojo.artifact.ConanArtifactInfo
Expand Down Expand Up @@ -61,12 +58,6 @@ class ConanSearchServiceImpl : ConanSearchService {
): ConanSearchResult {
val realPattern = pattern?.replace("*", ".*")
val recipes = searchRecipes(projectId, repoName, realPattern, ignoreCase)
if (recipes.isEmpty()) {
throw ConanSearchNotFoundException(
ConanMessageCode.CONAN_SEARCH_NOT_FOUND,
pattern ?: StringPool.EMPTY, "$projectId/$repoName"
)
}
return ConanSearchResult(recipes)
}

Expand Down

0 comments on commit ac962c0

Please sign in to comment.