diff --git a/server/api/provider/create.go b/server/api/provider/create.go index 03675c70..a3bdc4c4 100644 --- a/server/api/provider/create.go +++ b/server/api/provider/create.go @@ -19,8 +19,8 @@ func HandleCreate(providers core.ProviderStore) http.HandlerFunc { Host string `json:"host" valid:"url,required"` AccessToken string `json:"accessToken" valid:"stringlength(12|50),required"` Secret string `json:"secret" valid:"stringlength(5|50),required"` - HttpUser string `json:"HttpUser"` - HttpPass string `json:"HttpPass"` + HttpUser string `json:"httpUser"` + HttpPass string `json:"httpPass"` } return func(w http.ResponseWriter, r *http.Request) { diff --git a/server/api/provider/update.go b/server/api/provider/update.go index 3e35176f..fcecb713 100644 --- a/server/api/provider/update.go +++ b/server/api/provider/update.go @@ -20,8 +20,8 @@ func HandleUpdate(providers core.ProviderStore, users core.UserStore) http.Handl Host string `json:"host" valid:"url,required"` AccessToken string `json:"accessToken"` Secret string `json:"secret" valid:"stringlength(5|50),required"` - HttpUser string `json:"HttpUser"` - HttpPass string `json:"HttpPass"` + HttpUser string `json:"httpUser"` + HttpPass string `json:"httpPass"` } return func(w http.ResponseWriter, r *http.Request) { diff --git a/server/core/provider.go b/server/core/provider.go index 940a586e..387dce79 100644 --- a/server/core/provider.go +++ b/server/core/provider.go @@ -13,8 +13,8 @@ type ( Name string `gorm:"not null" json:"name"` URL string `gorm:"not null" json:"url"` AccessToken string `gorm:"not null" json:"-"` - HttpUser string `json:"HttpUser"` - HttpPass string `json:"HttpPass"` + HttpUser string `json:"httpUser"` + HttpPass string `json:"httpPass"` Secret string `gorm:"not null" json:"secret"` Host string `gorm:"not null" json:"host"` LastSync *time.Time `json:"lastSync"` diff --git a/web/abstruse/src/app/providers/providers-modal/providers-modal.component.ts b/web/abstruse/src/app/providers/providers-modal/providers-modal.component.ts index 111107d0..9f2f3763 100644 --- a/web/abstruse/src/app/providers/providers-modal/providers-modal.component.ts +++ b/web/abstruse/src/app/providers/providers-modal/providers-modal.component.ts @@ -144,8 +144,8 @@ export class ProvidersModalComponent implements OnInit { ], accessToken: [(this.provider && this.provider.accessToken) || null], secret: [(this.provider && this.provider.secret) || null, [Validators.required]], - httpUser: [(this.provider && this.provider.HttpUser) || null], - httpPass: [(this.provider && this.provider.HttpPass) || null] + httpUser: [(this.provider && this.provider.httpUser) || null], + httpPass: [(this.provider && this.provider.httpPass) || null] }); } } diff --git a/web/abstruse/src/app/providers/shared/provider.class.ts b/web/abstruse/src/app/providers/shared/provider.class.ts index b01bc9b8..f83677fb 100644 --- a/web/abstruse/src/app/providers/shared/provider.class.ts +++ b/web/abstruse/src/app/providers/shared/provider.class.ts @@ -10,8 +10,8 @@ export class Provider { public host?: string, public secret?: string, public accessToken?: string, - public HttpUser?: string, - public HttpPass?: string, + public httpUser?: string, + public httpPass?: string, public lastSync?: Date | null, public userID?: number, public createdAt?: Date, @@ -53,8 +53,8 @@ export const generateProvider = (data: any): Provider => { data.host, data.secret, data.accessToken, - data.HttpUser, - data.HttpPass, + data.httpUser, + data.httpPass, data.lastSync ? new Date(data.lastSync) : null, data.userID, new Date(data.createdAt), diff --git a/worker/app/server.go b/worker/app/server.go index 99c603d0..d74f84c8 100644 --- a/worker/app/server.go +++ b/worker/app/server.go @@ -219,21 +219,21 @@ func (s *Server) StartJob(job *pb.Job, stream pb.API_StartJobServer) error { logch <- []byte(yellow(fmt.Sprintf("==> Cloning repository %s ref: %s sha: %s... ", job.GetSshURL(), job.GetRef(), job.GetCommitSHA()))) } - HttpUser := job.GetProviderHttpUser() - if HttpUser == "" { - HttpUser = "user" + httpUser := job.GetProviderHttpUser() + if httpUser == "" { + httpUser = "user" } - HttpPass := job.GetProviderHttpPass() - if HttpPass == "" { - HttpPass = job.GetProviderToken() + httpPass := job.GetProviderHttpPass() + if httpPass == "" { + httpPass = job.GetProviderToken() } if err := git.CloneRepository( job.GetUrl(), job.GetRef(), job.GetCommitSHA(), - HttpUser, - HttpPass, + httpUser, + httpPass, dir, job.GetSshURL(), []byte(job.GetSshPrivateKey()),