mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-15 11:57:59 +00:00
api: make updating name optional in repo edit
and path escape the new name param
This commit is contained in:
+2
-3
@@ -187,7 +187,7 @@ func apiReposCreate(c *gin.Context) {
|
|||||||
|
|
||||||
type reposEditParams struct {
|
type reposEditParams struct {
|
||||||
// Name of repository to modify
|
// Name of repository to modify
|
||||||
Name *string `binding:"required" json:"Name" example:"repo1"`
|
Name *string ` json:"Name" example:"new-repo-name"`
|
||||||
// Change Comment of repository
|
// Change Comment of repository
|
||||||
Comment *string ` json:"Comment" example:"example repo"`
|
Comment *string ` json:"Comment" example:"example repo"`
|
||||||
// Change Default Distribution for publishing
|
// Change Default Distribution for publishing
|
||||||
@@ -199,7 +199,7 @@ type reposEditParams struct {
|
|||||||
// @Summary Update Repository
|
// @Summary Update Repository
|
||||||
// @Description **Update local repository meta information**
|
// @Description **Update local repository meta information**
|
||||||
// @Tags Repos
|
// @Tags Repos
|
||||||
// @Param name path string true "Repository name"
|
// @Param name path string true "Repository name to modify"
|
||||||
// @Consume json
|
// @Consume json
|
||||||
// @Param request body reposEditParams true "Parameters"
|
// @Param request body reposEditParams true "Parameters"
|
||||||
// @Produce json
|
// @Produce json
|
||||||
@@ -212,7 +212,6 @@ func apiReposEdit(c *gin.Context) {
|
|||||||
if c.Bind(&b) != nil {
|
if c.Bind(&b) != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load shallowly for 404 check and resource key.
|
// Load shallowly for 404 check and resource key.
|
||||||
// Mutation and duplicate check happen inside the task for atomicity.
|
// Mutation and duplicate check happen inside the task for atomicity.
|
||||||
collectionFactory := context.NewCollectionFactory()
|
collectionFactory := context.NewCollectionFactory()
|
||||||
|
|||||||
Reference in New Issue
Block a user