mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-06-25 20:00:27 +08:00
音视频通话
This commit is contained in:
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…
x
Reference in New Issue
Block a user