Update dal/mongo/dal.go
This commit is contained in:
parent
d5d8346375
commit
c53b539419
@ -504,7 +504,7 @@ func (d *DAL) YieldMessages(
|
|||||||
yield func(ticket model.Message) error) error {
|
yield func(ticket model.Message) error) error {
|
||||||
cursor, err := d.colMsg.Find(ctx, bson.M{
|
cursor, err := d.colMsg.Find(ctx, bson.M{
|
||||||
"TicketID": ticketID,
|
"TicketID": ticketID,
|
||||||
}, options.Find().SetLimit(20).SetSort(bson.D{{"CreatedAt", 1}}))
|
}, options.Find().SetLimit(20).SetSort(bson.D{{"CreatedAt", -1}}))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user