update due to refactor of struct project

This commit is contained in:
Wenkai Yin 2016-09-05 17:51:20 +08:00
parent 7dc7260c31
commit c9d20a93ad

View File

@ -192,7 +192,7 @@ func (c *Checker) enter() (string, error) {
return "", err
}
err = c.createProject(project.Public == 1)
err = c.createProject(project.Public)
if err == nil {
c.logger.Infof("project %s is created on %s with user %s", c.project, c.dstURL, c.dstUsr)
return StatePullManifest, nil
@ -211,13 +211,13 @@ func (c *Checker) enter() (string, error) {
return "", err
}
func (c *Checker) createProject(isPublic bool) error {
func (c *Checker) createProject(public int) error {
project := struct {
ProjectName string `json:"project_name"`
Public bool `json:"public"`
Public int `json:"public"`
}{
ProjectName: c.project,
Public: isPublic,
Public: public,
}
data, err := json.Marshal(project)