diff options
author | zeripath <art27@cantab.net> | 2020-09-23 21:25:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-23 15:25:46 -0500 |
commit | 3f522cdaad6e8ca30aefbb642cc88dfedcc94495 (patch) | |
tree | ca3361e061aebd832fdb5e9787f18b205d6915cc /modules/auth | |
parent | f215e015df7d03684ecab28e3a27d24620d5c8a2 (diff) | |
download | gitea-3f522cdaad6e8ca30aefbb642cc88dfedcc94495.tar.gz gitea-3f522cdaad6e8ca30aefbb642cc88dfedcc94495.zip |
Fix handling of migration errors (#12928)
* Fix handling of migration errors
The migration type selection screen PR did not correctly handle errors
and any user input error on the migration page would simply redirect
back to the selection page. This meant that the error would simply be
lost and the user would be none the wiser as to what happened.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* make gen-swagger
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules/auth')
-rw-r--r-- | modules/auth/repo_form.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go index f1130f372b..e8809136c9 100644 --- a/modules/auth/repo_form.go +++ b/modules/auth/repo_form.go @@ -11,6 +11,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/utils" "gitea.com/macaron/binding" @@ -57,11 +58,11 @@ func (f *CreateRepoForm) Validate(ctx *macaron.Context, errs binding.Errors) bin // this is used to interact with web ui type MigrateRepoForm struct { // required: true - CloneAddr string `json:"clone_addr" binding:"Required"` - Service int `json:"service"` - AuthUsername string `json:"auth_username"` - AuthPassword string `json:"auth_password"` - AuthToken string `json:"auth_token"` + CloneAddr string `json:"clone_addr" binding:"Required"` + Service structs.GitServiceType `json:"service"` + AuthUsername string `json:"auth_username"` + AuthPassword string `json:"auth_password"` + AuthToken string `json:"auth_token"` // required: true UID int64 `json:"uid" binding:"Required"` // required: true |