Allow edit registry description

Signed-off-by: cd1989 <chende@caicloud.io>
This commit is contained in:
cd1989 2019-04-03 19:47:14 +08:00
parent 3978def928
commit 8968e82675
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
}