diff --git a/websrc/controllers/migrationHandlers.go b/websrc/controllers/migrationHandlers.go index f3f5d47..1193bdc 100644 --- a/websrc/controllers/migrationHandlers.go +++ b/websrc/controllers/migrationHandlers.go @@ -428,23 +428,14 @@ func MigrationMySQLPostHandler() gin.HandlerFunc { logger, logstrings := pageLogInit("migmysql", "Import mysql to mysql", start) formdata := MigrationMySQLForm{} - params := GetMigrationParamsFormFormData(formdata) - - if err := ctx.ShouldBind(¶ms); err != nil { + if !getDataWithBind(logger, start, ctx, &formdata) { ctx.JSONP(http.StatusOK, gin.H{ - "Result": "failed to send Form data", - "Error": err, + "Result": logstrings.String(), + "Error": nil, }) return } - - // if !getDataWithBind(logger, start, ctx, ¶ms) { - // ctx.JSONP(http.StatusOK, gin.H{ - // "Result": logstrings.String(), - // "Error": nil, - // }) - // return - // } + params := GetMigrationParamsFormFormData(formdata) srdbc := getMysqlRDBC(logger, start, "smig", params) if srdbc == nil { diff --git a/websrc/controllers/migrationStructs.go b/websrc/controllers/migrationStructs.go index b55cae0..61315d9 100644 --- a/websrc/controllers/migrationStructs.go +++ b/websrc/controllers/migrationStructs.go @@ -42,7 +42,7 @@ type MigrationMySQLForm struct { SDatabaseName string `json:"srcDatabaseName" form:"srcDatabaseName"` DProvider string `json:"destProvider" form:"destProvider"` - DHost string `json:"destHost" form:"desttHost"` + DHost string `json:"destHost" form:"destHost"` DPort string `json:"destPort" form:"destPort"` DUsername string `json:"destUsername" form:"destUsername"` DPassword string `json:"destPassword" form:"destPassword"`