2 Commits

Author SHA1 Message Date
Fran Jurmanović
4ab94de529 resolve test failing
All checks were successful
Release and Deploy / build (push) Successful in 2m12s
Release and Deploy / deploy (push) Successful in 27s
2025-09-14 22:05:25 +02:00
Fran Jurmanović
b3f89593fb replace id type
Some checks failed
Release and Deploy / build (push) Failing after 2m7s
Release and Deploy / deploy (push) Has been skipped
2025-09-14 17:08:50 +02:00
2 changed files with 13 additions and 11 deletions

View File

@@ -1,5 +1,7 @@
package model
import "github.com/google/uuid"
type SessionCount struct {
Name string `json:"name"`
Count int `json:"count"`
@@ -27,7 +29,7 @@ type StateHistoryStats struct {
}
type RecentSession struct {
ID uint `json:"id"`
ID uuid.UUID `json:"id"`
Date string `json:"date"`
Type string `json:"type"`
Track string `json:"track"`

View File

@@ -360,7 +360,7 @@ func (m *MockStateHistoryRepository) GetRecentSessions(ctx context.Context, filt
if maxPlayers > 0 {
duration := int(maxDate.Sub(minDate).Minutes())
recentSessions = append(recentSessions, model.RecentSession{
ID: uint(count + 1),
ID: entries[0].SessionID,
Date: minDate.Format("2006-01-02 15:04:05"),
Type: entries[0].Session,
Track: entries[0].Track,