diff --git a/client/lib/lib.go b/client/lib/lib.go index c8c1c2b..746ab01 100644 --- a/client/lib/lib.go +++ b/client/lib/lib.go @@ -1182,7 +1182,11 @@ func Search(ctx *context.Context, db *gorm.DB, query string, limit int) ([]*data if err != nil { return nil, err } - tx = tx.Order("start_time DESC") + if hctx.GetConf(ctx).BetaMode { + tx = tx.Order("start_time DESC") + } else { + tx = tx.Order("end_time DESC") + } if limit > 0 { tx = tx.Limit(limit) }