From 6be297d3a32861778b1d64e34e4f4ae057152ab2 Mon Sep 17 00:00:00 2001 From: AndrewZuo01 Date: Wed, 29 Nov 2023 12:18:22 +0800 Subject: [PATCH] FIX BUG --- internal/rpc/chat/login.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/rpc/chat/login.go b/internal/rpc/chat/login.go index 49c8ea8c7..15764d5ee 100644 --- a/internal/rpc/chat/login.go +++ b/internal/rpc/chat/login.go @@ -239,7 +239,7 @@ func (o *chatSvr) genVerifyCode() string { func (o *chatSvr) RegisterUser(ctx context.Context, req *chat.RegisterUserReq) (*chat.RegisterUserResp, error) { resp := &chat.RegisterUserResp{} - defer log.ZDebug(ctx, "return") + isAdmin, err := o.Admin.CheckNilOrAdmin(ctx) ctx = mctx.WithAdminUser(ctx) if err != nil { @@ -248,6 +248,7 @@ func (o *chatSvr) RegisterUser(ctx context.Context, req *chat.RegisterUserReq) ( if req.User == nil { return nil, errs.ErrArgs.Wrap("user is nil") } + log.ZDebug(ctx, "email", req.User.Email) if req.User.Email == "" { if (req.User.AreaCode == "" && req.User.PhoneNumber != "") || (req.User.AreaCode != "" && req.User.PhoneNumber == "") { return nil, errs.ErrArgs.Wrap("area code or phone number error, no email provide")