generated from VLADIMIR/template
up
This commit is contained in:
@@ -23,6 +23,7 @@ type ScreenSession struct {
|
||||
TimerRemainingSeconds int64
|
||||
TimerState int32
|
||||
TimerEndsAt *time.Time
|
||||
Text string
|
||||
}
|
||||
|
||||
func mapSession(session *screen_sessions_repo.ScreenSession) *ScreenSession {
|
||||
@@ -41,5 +42,6 @@ func mapSession(session *screen_sessions_repo.ScreenSession) *ScreenSession {
|
||||
TimerRemainingSeconds: session.TimerRemainingSeconds,
|
||||
TimerState: session.TimerState,
|
||||
TimerEndsAt: session.TimerEndsAt,
|
||||
Text: session.Text,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,11 @@ func (s *ScreenService) SetTimer(ctx context.Context, gameID int, duration int64
|
||||
return s.repo.SetTimer(ctx, gameID, duration, label)
|
||||
}
|
||||
|
||||
// SetText updates the text screen for a game.
|
||||
func (s *ScreenService) SetText(ctx context.Context, gameID int, text string) error {
|
||||
return s.repo.SetText(ctx, gameID, text)
|
||||
}
|
||||
|
||||
// SetTimerCommand updates the timer command for a game.
|
||||
func (s *ScreenService) SetTimerCommand(ctx context.Context, gameID int, command int32) error {
|
||||
return s.repo.SetTimerCommand(ctx, gameID, command)
|
||||
|
||||
Reference in New Issue
Block a user