mirror of
https://github.com/goharbor/harbor
synced 2025-04-19 01:28:59 +00:00
Merge pull request #4460 from ywk253100/180322_repo
Fuzzy matching repository name in GET repositories API
This commit is contained in:
commit
ba8ca395c5
|
@ -156,8 +156,8 @@ func repositoryQueryConditions(query ...*models.RepositoryQuery) (string, []inte
|
||||||
sql += `where 1=1 `
|
sql += `where 1=1 `
|
||||||
|
|
||||||
if len(q.Name) > 0 {
|
if len(q.Name) > 0 {
|
||||||
sql += `and r.name = ? `
|
sql += `and r.name like ? `
|
||||||
params = append(params, q.Name)
|
params = append(params, "%"+Escape(q.Name)+"%")
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(q.ProjectIDs) > 0 {
|
if len(q.ProjectIDs) > 0 {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user