Merge pull request #7290 from cd1989/edit-registry-description

Allow edit registry description
This commit is contained in:
Wenkai Yin 2019-04-03 21:09:25 +08:00 committed by GitHub
commit 9e88f3d28e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View File

@ -4272,6 +4272,9 @@ definitions:
name:
type: string
description: The registry name.
description:
type: string
description: Description of the registry.
url:
type: string
description: The registry address URL string.

View File

@ -3,6 +3,7 @@ package models
// RegistryUpdateRequest is request used to update a registry.
type RegistryUpdateRequest struct {
Name *string `json:"name"`
Description *string `json:"description"`
URL *string `json:"url"`
CredentialType *string `json:"credential_type"`
AccessKey *string `json:"access_key"`

View File

@ -135,6 +135,9 @@ func (t *RegistryAPI) Put() {
if req.Name != nil {
registry.Name = *req.Name
}
if req.Description != nil {
registry.Description = *req.Description
}
if req.URL != nil {
registry.URL = *req.URL
}