mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
Properly order heartbeats.
This commit is contained in:
parent
005b17a73c
commit
d75da7681b
@ -33,6 +33,7 @@ func (srv *HeartbeatService) GetAllWithin(from, to time.Time, user *models.User)
|
|||||||
Where(&models.Heartbeat{UserID: user.ID}).
|
Where(&models.Heartbeat{UserID: user.ID}).
|
||||||
Where("time >= ?", from).
|
Where("time >= ?", from).
|
||||||
Where("time <= ?", to).
|
Where("time <= ?", to).
|
||||||
|
Order("time asc").
|
||||||
Find(&heartbeats).Error; err != nil {
|
Find(&heartbeats).Error; err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user