1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

refctor: change active users query

This commit is contained in:
Ferdinand Mütsch
2021-02-13 11:23:58 +01:00
parent 6b0b3bddda
commit daf67b844a
12 changed files with 430 additions and 358 deletions

View File

@ -30,6 +30,11 @@ func (m *HeartbeatServiceMock) CountByUser(user *models.User) (int64, error) {
return args.Get(0).(int64), args.Error(0)
}
func (m *HeartbeatServiceMock) CountByUsers(users []*models.User) ([]*models.CountByUser, error) {
args := m.Called(users)
return args.Get(0).([]*models.CountByUser), args.Error(0)
}
func (m *HeartbeatServiceMock) GetAllWithin(time time.Time, time2 time.Time, user *models.User) ([]*models.Heartbeat, error) {
args := m.Called(time, time2, user)
return args.Get(0).([]*models.Heartbeat), args.Error(1)