mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
work_moments
This commit is contained in:
parent
67dcd24410
commit
8d93d5a780
@ -180,7 +180,7 @@ func GetUserWorkMoments(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req)
|
||||
ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
|
||||
ok, opUserID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID)
|
||||
if !ok {
|
||||
log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token"))
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"})
|
||||
@ -191,7 +191,8 @@ func GetUserWorkMoments(c *gin.Context) {
|
||||
PageNumber: req.PageNumber,
|
||||
ShowNumber: req.ShowNumber,
|
||||
}
|
||||
reqPb.UserID = userID
|
||||
reqPb.OpUserID = opUserID
|
||||
reqPb.UserID = req.UserID
|
||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName)
|
||||
client := pbOffice.NewOfficeServiceClient(etcdConn)
|
||||
respPb, err := client.GetUserWorkMoments(context.Background(), &reqPb)
|
||||
|
@ -43,6 +43,7 @@ type WorkMomentsUserCommonReq struct {
|
||||
|
||||
type GetUserWorkMomentsReq struct {
|
||||
WorkMomentsUserCommonReq
|
||||
UserID string `json:"userID"`
|
||||
}
|
||||
|
||||
type GetUserWorkMomentsResp struct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user