diff --git a/app/controller/admin/auth.go b/app/controller/admin/auth.go index f0ad647..d88e4b3 100644 --- a/app/controller/admin/auth.go +++ b/app/controller/admin/auth.go @@ -110,10 +110,6 @@ func (c *Auth) AddMenu(r *ghttp.Request) { if !auth_service.CheckMenuNameUnique(menu.Name, 0) { response.FailJson(true, r, "菜单规则名称已经存在") } - //判断路由是否已经存在 - if !auth_service.CheckMenuPathUnique(menu.Path, 0) { - response.FailJson(true, r, "路由地址已经存在") - } //保存到数据库 err, _ := auth_service.AddMenu(menu) if err != nil { @@ -152,10 +148,6 @@ func (c *Auth) EditMenu(r *ghttp.Request) { if !auth_service.CheckMenuNameUnique(menu.Name, id) { response.FailJson(true, r, "菜单规则名称已经存在") } - //判断路由是否已经存在 - if !auth_service.CheckMenuPathUnique(menu.Path, id) { - response.FailJson(true, r, "路由地址已经存在") - } //保存到数据库 err, _ := auth_service.EditMenu(menu, id) if err != nil { diff --git a/config/config.toml b/config/config.toml index b6c6395..e9a0564 100644 --- a/config/config.toml +++ b/config/config.toml @@ -1,6 +1,11 @@ # 数据库连接 [database] - link = "mysql:root:123456@tcp(127.0.0.1:3306)/gfast_open" + type = "mysql" + host = "192.168.0.212" + port = "3306" + user = "devuser" + pass = "123456" + name = "gfast" charset = "utf8mb4" #数据库编码 maxIdle = "10" #连接池最大闲置的连接数 maxOpen = "10" #连接池最大打开的连接数