diff options
author | Paul Barton <28630076+paulbarton90@users.noreply.github.com> | 2021-01-02 23:47:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-02 18:47:47 -0500 |
commit | 7576e37a65729363370d6672ff6e69e87b68ac5f (patch) | |
tree | c2e885826e6f744b88949c9451d6a206ff48abcd /modules/auth | |
parent | 3abea9e9eb8cbe42d1ec0afa70b4941d4066130f (diff) | |
download | gitea-7576e37a65729363370d6672ff6e69e87b68ac5f.tar.gz gitea-7576e37a65729363370d6672ff6e69e87b68ac5f.zip |
Add MirrorInterval to the API (#14163)
* Added MirrorInterval to the API
* Remove MirrorInterval from CreateRepository
* Removed Duplicate UpdateMirror Function
* Updated Error Logging
* Update Log Message for is not Mirror
Co-authored-by: 6543 <6543@obermui.de>
* Delete Debug Statement that snuck in
Co-authored-by: zeripath <art27@cantab.net>
* Add Check for If Interval is too small
* Output to API Call
* Add Error Object when time is Less than Min Interval
* Frequency Error Message
Co-authored-by: zeripath <art27@cantab.net>
* Allow Zero Mirror Interval
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'modules/auth')
-rw-r--r-- | modules/auth/repo_form.go | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go index 24c2478fa4..87f2a53510 100644 --- a/modules/auth/repo_form.go +++ b/modules/auth/repo_form.go @@ -68,16 +68,17 @@ type MigrateRepoForm struct { // required: true UID int64 `json:"uid" binding:"Required"` // required: true - RepoName string `json:"repo_name" binding:"Required;AlphaDashDot;MaxSize(100)"` - Mirror bool `json:"mirror"` - Private bool `json:"private"` - Description string `json:"description" binding:"MaxSize(255)"` - Wiki bool `json:"wiki"` - Milestones bool `json:"milestones"` - Labels bool `json:"labels"` - Issues bool `json:"issues"` - PullRequests bool `json:"pull_requests"` - Releases bool `json:"releases"` + RepoName string `json:"repo_name" binding:"Required;AlphaDashDot;MaxSize(100)"` + Mirror bool `json:"mirror"` + Private bool `json:"private"` + Description string `json:"description" binding:"MaxSize(255)"` + Wiki bool `json:"wiki"` + Milestones bool `json:"milestones"` + Labels bool `json:"labels"` + Issues bool `json:"issues"` + PullRequests bool `json:"pull_requests"` + Releases bool `json:"releases"` + MirrorInterval string `json:"mirror_interval"` } // Validate validates the fields |