Skip to content

Commit

Permalink
feat: added fields for git
Browse files Browse the repository at this point in the history
  • Loading branch information
tikazyq committed Jun 19, 2024
1 parent b757826 commit 7c42d68
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
4 changes: 4 additions & 0 deletions core/controllers/utils_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ func HandleErrorBadRequest(c *gin.Context, err error) {
HandleError(http.StatusBadRequest, c, err)
}

func HandleErrorForbidden(c *gin.Context, err error) {
HandleError(http.StatusForbidden, c, err)
}

func HandleErrorUnauthorized(c *gin.Context, err error) {
HandleError(http.StatusUnauthorized, c, err)
}
Expand Down
17 changes: 9 additions & 8 deletions core/models/models/git_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package models
type GitV2 struct {
any `collection:"gits"`
BaseModelV2[GitV2] `bson:",inline"`
Url string `json:"url" bson:"url"`
Name string `json:"name" bson:"name"`
AuthType string `json:"auth_type" bson:"auth_type"`
Username string `json:"username" bson:"username"`
Password string `json:"password" bson:"password"`
CurrentBranch string `json:"current_branch" bson:"current_branch"`
Status string `json:"status" bson:"status"`
Error string `json:"error" bson:"error"`
Url string `json:"url" bson:"url"`
Name string `json:"name" bson:"name"`
AuthType string `json:"auth_type" bson:"auth_type"`
Username string `json:"username" bson:"username"`
Password string `json:"password" bson:"password"`
CurrentBranch string `json:"current_branch" bson:"current_branch"`
Status string `json:"status" bson:"status"`
Error string `json:"error" bson:"error"`
Spiders []SpiderV2 `json:"spiders,omitempty" bson:"-"`

// settings
AutoPull bool `json:"auto_pull" bson:"auto_pull"`
Expand Down

0 comments on commit 7c42d68

Please sign in to comment.