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
30df45ef2e
commit
bccaf16343
@ -201,8 +201,7 @@ func GetWorkMomentByID(c *gin.Context) {
|
|||||||
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
|
if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil {
|
||||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||||
}
|
}
|
||||||
//resp.Data.WorkMoment = respPb.WorkMoment
|
resp.Data.WorkMoment = &apiStruct.WorkMoment{LikeUserList: []*apiStruct.WorkMomentUser{}, Comments: []*apiStruct.Comment{}, AtUserList: []*apiStruct.WorkMomentUser{}}
|
||||||
resp.Data.WorkMoment = &apiStruct.WorkMoment{}
|
|
||||||
if err := utils.CopyStructFields(&resp.Data.WorkMoment, respPb.WorkMoment); err != nil {
|
if err := utils.CopyStructFields(&resp.Data.WorkMoment, respPb.WorkMoment); err != nil {
|
||||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error())
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ func init() {
|
|||||||
|
|
||||||
cCommentMsgModels := []mongo.IndexModel{
|
cCommentMsgModels := []mongo.IndexModel{
|
||||||
{
|
{
|
||||||
Keys: bson.M{"create_time": -1, "user_id": -1},
|
Keys: bson.A{bson.D{{"create_time", -1}, {"user_id", -1}}},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
result, err := dataBase.Collection(cCommentMsg).Indexes().CreateMany(context.Background(), cCommentMsgModels, opts)
|
result, err := dataBase.Collection(cCommentMsg).Indexes().CreateMany(context.Background(), cCommentMsgModels, opts)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user