mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-30 17:13:08 +08:00
Merge pull request #2002 from tb365/bugfix/tb-copyright-climc
copyright update climc fix
This commit is contained in:
@@ -24,9 +24,9 @@ import (
|
||||
|
||||
func init() {
|
||||
type CopyrightUpdateOptions struct {
|
||||
Copyright string `help:"The copyright"`
|
||||
Email string `help:"The Email"`
|
||||
Docs string `help:"the Docs website address" required:"true"`
|
||||
Copyright string `help:"The copyright"`
|
||||
Email string `help:"The Email"`
|
||||
Docs *string `help:"the Docs website address"`
|
||||
}
|
||||
|
||||
R(&CopyrightUpdateOptions{}, "copyright-update", "update copyright", func(s *mcclient.ClientSession, args *CopyrightUpdateOptions) error {
|
||||
@@ -35,7 +35,10 @@ func init() {
|
||||
}
|
||||
|
||||
params := jsonutils.NewDict()
|
||||
params.Add(jsonutils.NewString(args.Docs), "docs")
|
||||
if args.Docs != nil {
|
||||
params.Add(jsonutils.NewString(*args.Docs), "docs")
|
||||
}
|
||||
|
||||
if len(args.Copyright) > 0 {
|
||||
params.Add(jsonutils.NewString(args.Copyright), "copyright")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user