mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-07-15 18:41:11 +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/open-im-server/v3/pkg/common/storage/database"
|
||||||
"github.com/openimsdk/tools/apiresp"
|
"github.com/openimsdk/tools/apiresp"
|
||||||
"github.com/openimsdk/tools/errs"
|
"github.com/openimsdk/tools/errs"
|
||||||
|
"github.com/openimsdk/tools/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PhoneSNApi struct {
|
type PhoneSNApi struct {
|
||||||
@ -42,16 +43,19 @@ func (a *PhoneSNApi) GetSNInfo(c *gin.Context) {
|
|||||||
var req phoneGetSNInfoReq
|
var req phoneGetSNInfoReq
|
||||||
if err := c.ShouldBindJSON(&req); err != nil {
|
if err := c.ShouldBindJSON(&req); err != nil {
|
||||||
apiresp.GinError(c, errs.ErrArgs.WrapMsg(err.Error()))
|
apiresp.GinError(c, errs.ErrArgs.WrapMsg(err.Error()))
|
||||||
|
log.ZError(c, "GetSNInfo", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
phone := strings.TrimSpace(req.Phone)
|
phone := strings.TrimSpace(req.Phone)
|
||||||
if phone == "" {
|
if phone == "" {
|
||||||
apiresp.GinError(c, errs.ErrArgs.WrapMsg("phone is empty"))
|
apiresp.GinError(c, errs.ErrArgs.WrapMsg("phone is empty"))
|
||||||
|
log.ZError(c, "GetSNInfo", errs.ErrArgs.WrapMsg("phone is empty"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
info, err := a.db.GetByPhone(c, phone)
|
info, err := a.db.GetByPhone(c, phone)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
apiresp.GinError(c, err)
|
apiresp.GinError(c, err)
|
||||||
|
log.ZError(c, "GetSNInfo", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
resp := phoneGetSNInfoResp{IsSnd: false, UserID: 0}
|
resp := phoneGetSNInfoResp{IsSnd: false, UserID: 0}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user