音视频通话

pull/3727/head
hawklin2017 2 months ago
parent afc64057d9
commit 90629c893f

@ -12,6 +12,7 @@ import (
"github.com/openimsdk/open-im-server/v3/pkg/common/storage/database"
"github.com/openimsdk/tools/apiresp"
"github.com/openimsdk/tools/errs"
"github.com/openimsdk/tools/log"
)
type PhoneSNApi struct {
@ -42,16 +43,19 @@ func (a *PhoneSNApi) GetSNInfo(c *gin.Context) {
var req phoneGetSNInfoReq
if err := c.ShouldBindJSON(&req); err != nil {
apiresp.GinError(c, errs.ErrArgs.WrapMsg(err.Error()))
log.ZError(c, "GetSNInfo", err)
return
}
phone := strings.TrimSpace(req.Phone)
if phone == "" {
apiresp.GinError(c, errs.ErrArgs.WrapMsg("phone is empty"))
log.ZError(c, "GetSNInfo", errs.ErrArgs.WrapMsg("phone is empty"))
return
}
info, err := a.db.GetByPhone(c, phone)
if err != nil {
apiresp.GinError(c, err)
log.ZError(c, "GetSNInfo", err)
return
}
resp := phoneGetSNInfoResp{IsSnd: false, UserID: 0}

Loading…
Cancel
Save