用户权限更新问题

This commit is contained in:
junleea 2024-10-21 13:02:28 +08:00
parent 2e96977f26
commit fa0781c353
1 changed files with 2 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package service
import (
"fmt"
"regexp"
"videoplayer/dao"
"videoplayer/proto"
@ -44,6 +45,7 @@ func GetUserByNameLike(name string) []proto.User {
func UpdateUser(user_id int, req proto.UpdateUserInfoReq) (int, error) {
cur_user := dao.FindUserByID2(user_id)
fmt.Println("cur_user:", cur_user, "req:", req)
if user_id == req.ID {
dao.UpdateUserByID2(user_id, req)
return user_id, nil