Skip to content

Commit

Permalink
fix: fix the upate admin info error (#459)
Browse files Browse the repository at this point in the history
Co-authored-by: Xinwei Xiong <[email protected]>
  • Loading branch information
luhaoling and cubxxw authored Mar 13, 2024
1 parent e54730d commit 5b7a3d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/api/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (o *AdminApi) AdminUpdateInfo(c *gin.Context) {
apiresp.GinError(c, err)
return
}
apiresp.GinSuccess(c, nil)

imAdminUserID := config.GetIMAdmin(resp.UserID)
imToken, err := o.imApiCaller.UserToken(c, imAdminUserID, constant.AdminPlatformID)
if err != nil {
Expand All @@ -119,6 +119,7 @@ func (o *AdminApi) AdminUpdateInfo(c *gin.Context) {
if err := o.imApiCaller.UpdateUserInfo(mctx.WithApiToken(c, imToken), imAdminUserID, resp.Nickname, resp.FaceURL); err != nil {
log.ZError(c, "AdminUpdateInfo UpdateUserInfo", err, "userID", resp.UserID, "nickName", resp.Nickname, "faceURL", resp.FaceURL)
}
apiresp.GinSuccess(c, nil)
}

func (o *AdminApi) AdminInfo(c *gin.Context) {
Expand Down

0 comments on commit 5b7a3d4

Please sign in to comment.