Skip to content

Commit

Permalink
feat: reverse sorting in sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
tikazyq committed Apr 5, 2023
1 parent 0128d61 commit 51c21ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controllers/delegate_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ func (d *ListControllerDelegate) getAll(c *gin.Context) {
// get list
tic := time.Now()
log.Debugf("getAll -> d.svc.GetList:start")
list, err := d.svc.GetList(nil, nil)
list, err := d.svc.GetList(nil, &mongo.FindOptions{
Sort: bson.D{{"_id", -1}},
})
if err != nil {
if err == mongo2.ErrNoDocuments {
HandleErrorNotFound(c, err)
Expand Down

0 comments on commit 51c21ca

Please sign in to comment.