Skip to content

Commit

Permalink
refactor(providers): Review code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Porsh33 committed Apr 14, 2022
1 parent af4b6f8 commit 68b13d9
Show file tree
Hide file tree
Showing 8 changed files with 15,608 additions and 11,536 deletions.
4 changes: 2 additions & 2 deletions server/api/provider/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions server/api/provider/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions server/core/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
Loading

0 comments on commit 68b13d9

Please sign in to comment.