diff --git a/trojan/user.go b/trojan/user.go index 4ff1b889..f9b527bc 100644 --- a/trojan/user.go +++ b/trojan/user.go @@ -64,6 +64,7 @@ func DelUser() { } if mysql.DeleteUser(userList[choice-1].ID) == nil { fmt.Println("删除用户成功!") + Restart() } } diff --git a/web/controller/user.go b/web/controller/user.go index 2c48f63c..163d5022 100644 --- a/web/controller/user.go +++ b/web/controller/user.go @@ -131,6 +131,8 @@ func DelUser(id uint) *ResponseBody { mysql := core.GetMysql() if err := mysql.DeleteUser(id); err != nil { responseBody.Msg = err.Error() + } else { + trojan.Restart() } return &responseBody }