fix CopyRight to Copyright

This commit is contained in:
TangBin
2019-05-11 18:12:23 +08:00
parent f2200a8690
commit bf8bf3a910
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -23,12 +23,12 @@ import (
)
func init() {
type CopyRightUpdateOptions struct {
type CopyrightUpdateOptions struct {
Copyright string `help:"The copyright"`
Email string `help:"The Email"`
}
R(&CopyRightUpdateOptions{}, "copyright-update", "update copyright", func(s *mcclient.ClientSession, args *CopyRightUpdateOptions) error {
R(&CopyrightUpdateOptions{}, "copyright-update", "update copyright", func(s *mcclient.ClientSession, args *CopyrightUpdateOptions) error {
if !s.HasSystemAdminPrivilege() {
return fmt.Errorf("require admin privilege")
}
@@ -42,7 +42,7 @@ func init() {
params.Add(jsonutils.NewString(args.Email), "email")
}
r, err := modules.CopyRight.Create(s, params)
r, err := modules.Copyright.Create(s, params)
if err != nil {
return err
}
+4 -4
View File
@@ -1,16 +1,16 @@
package modules
type CopyRightManager struct {
type CopyrightManager struct {
ResourceManager
}
var (
CopyRight CopyRightManager
Copyright CopyrightManager
)
func init() {
CopyRight = CopyRightManager{NewYunionAgentManager("info", "infos",
Copyright = CopyrightManager{NewYunionAgentManager("info", "infos",
[]string{"copyright", "email"},
[]string{})}
register(&CopyRight)
register(&Copyright)
}