API GetRepos() return empty list if no active repos exist (#658)

This commit is contained in:
jdoubleu 2022-01-03 20:31:53 +01:00 committed by GitHub
parent 132d3567f4
commit abd3d1d5c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,7 +128,7 @@ func GetRepos(c *gin.Context) {
return
}
var active []*model.Repo
active := make([]*model.Repo, 0)
for _, repo := range repos {
if repo.IsActive {
active = append(active, repo)