Add seed field to models.Session
All checks were successful
Build and push Probo image on the registry / login (push) Successful in 2m59s

This commit is contained in:
andrea 2025-05-23 14:00:35 +02:00
commit 4decf37b3d
2 changed files with 4 additions and 0 deletions

View file

@ -28,6 +28,8 @@ type Session struct {
IsAlwaysActive bool `json:"always_active"` // Indicates if the session is always active.
Seed uint64 `json:"seed"` // Seed for the random number generator
Participants map[string]*Participant `json:"participants"` // Participants in the session, identified by a string key.
Quizzes map[string]*Quiz `json:"quizzes"` // Quizzes associated with the session, identified by a string key.
Answers map[string]*Answer `json:"answers"` // Answers related to the session, identified by a string key.

View file

@ -76,6 +76,8 @@ func (s *Store) Create(session *models.Session) (*models.Session, error) {
if hash := session.GetHash(); hash != "" {
session, ok := s.GetByHash(hash)
if ok {
// q.SetDuplicate(quiz.GetMeta())
// return q, nil //&ErrQuizAlreadyPresent{hash}
return session, &ErrAlreadyPresent{hash}
}
}