mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-19 03:06:45 +02:00
Sort by start_time in beta mode only, to fix failing tests caused by changing the sorting
This commit is contained in:
@@ -1182,7 +1182,11 @@ func Search(ctx *context.Context, db *gorm.DB, query string, limit int) ([]*data
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
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 {
|
if limit > 0 {
|
||||||
tx = tx.Limit(limit)
|
tx = tx.Limit(limit)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user