Compare commits
4 Commits
e30115e539
...
8c24850420
Author | SHA1 | Date |
---|---|---|
|
8c24850420 | |
|
0c0ffdceb1 | |
|
73d3b45ac9 | |
|
5db69591df |
|
@ -1867,7 +1867,7 @@ func (m *Mongo) GetMomentListByIds(ctx *gin.Context, momentIds []int64) ([]*dbst
|
||||||
err := col.Find(ctx, query).Sort("_id").All(&list)
|
err := col.Find(ctx, query).Sort("_id").All(&list)
|
||||||
if err == qmgo.ErrNoSuchDocuments {
|
if err == qmgo.ErrNoSuchDocuments {
|
||||||
err = nil
|
err = nil
|
||||||
return list, err
|
return make([]*dbstruct.Moment, 0), err
|
||||||
}
|
}
|
||||||
return list, err
|
return list, err
|
||||||
}
|
}
|
||||||
|
@ -5052,10 +5052,10 @@ func (m *Mongo) GetZoneMomentById(ctx *gin.Context, id int64) (*dbstruct.ZoneMom
|
||||||
"_id": id,
|
"_id": id,
|
||||||
"del_flag": 0,
|
"del_flag": 0,
|
||||||
}
|
}
|
||||||
err := col.Find(ctx, query).One(&zonemoment)
|
err := col.Find(ctx, query).One(zonemoment)
|
||||||
if err == qmgo.ErrNoSuchDocuments {
|
if err == qmgo.ErrNoSuchDocuments {
|
||||||
err = nil
|
err = nil
|
||||||
return zonemoment, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return zonemoment, err
|
return zonemoment, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue