mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
feat: added fields for git
This commit is contained in:
@@ -31,6 +31,10 @@ func HandleErrorBadRequest(c *gin.Context, err error) {
|
|||||||
HandleError(http.StatusBadRequest, c, err)
|
HandleError(http.StatusBadRequest, c, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func HandleErrorForbidden(c *gin.Context, err error) {
|
||||||
|
HandleError(http.StatusForbidden, c, err)
|
||||||
|
}
|
||||||
|
|
||||||
func HandleErrorUnauthorized(c *gin.Context, err error) {
|
func HandleErrorUnauthorized(c *gin.Context, err error) {
|
||||||
HandleError(http.StatusUnauthorized, c, err)
|
HandleError(http.StatusUnauthorized, c, err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,14 +3,15 @@ package models
|
|||||||
type GitV2 struct {
|
type GitV2 struct {
|
||||||
any `collection:"gits"`
|
any `collection:"gits"`
|
||||||
BaseModelV2[GitV2] `bson:",inline"`
|
BaseModelV2[GitV2] `bson:",inline"`
|
||||||
Url string `json:"url" bson:"url"`
|
Url string `json:"url" bson:"url"`
|
||||||
Name string `json:"name" bson:"name"`
|
Name string `json:"name" bson:"name"`
|
||||||
AuthType string `json:"auth_type" bson:"auth_type"`
|
AuthType string `json:"auth_type" bson:"auth_type"`
|
||||||
Username string `json:"username" bson:"username"`
|
Username string `json:"username" bson:"username"`
|
||||||
Password string `json:"password" bson:"password"`
|
Password string `json:"password" bson:"password"`
|
||||||
CurrentBranch string `json:"current_branch" bson:"current_branch"`
|
CurrentBranch string `json:"current_branch" bson:"current_branch"`
|
||||||
Status string `json:"status" bson:"status"`
|
Status string `json:"status" bson:"status"`
|
||||||
Error string `json:"error" bson:"error"`
|
Error string `json:"error" bson:"error"`
|
||||||
|
Spiders []SpiderV2 `json:"spiders,omitempty" bson:"-"`
|
||||||
|
|
||||||
// settings
|
// settings
|
||||||
AutoPull bool `json:"auto_pull" bson:"auto_pull"`
|
AutoPull bool `json:"auto_pull" bson:"auto_pull"`
|
||||||
|
|||||||
Reference in New Issue
Block a user