mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-04-19 19:28:22 +00:00
Allow comment and defaults to be empty when editing a repo through the API
This commit is contained in:
12
api/repos.go
12
api/repos.go
@@ -79,15 +79,9 @@ func apiReposEdit(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if b.Comment != "" {
|
||||
repo.Comment = b.Comment
|
||||
}
|
||||
if b.DefaultDistribution != "" {
|
||||
repo.DefaultDistribution = b.DefaultDistribution
|
||||
}
|
||||
if b.DefaultComponent != "" {
|
||||
repo.DefaultComponent = b.DefaultComponent
|
||||
}
|
||||
repo.Comment = b.Comment
|
||||
repo.DefaultDistribution = b.DefaultDistribution
|
||||
repo.DefaultComponent = b.DefaultComponent
|
||||
|
||||
err = collection.Update(repo)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user