mirror of
https://github.com/tiger1103/gfast.git
synced 2026-09-21 10:12:59 +00:00
修改数据库连接配置
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user