mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-23 00:34:27 +01:00
Sort by start_time in beta mode only, to fix failing tests caused by changing the sorting
This commit is contained in:
parent
25ec191f1a
commit
5dae81d336
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user