generated from VLADIMIR/template
add location
This commit is contained in:
@@ -47,6 +47,7 @@ func (s *GameService) AddGame(
|
||||
ctx context.Context,
|
||||
name string,
|
||||
description string,
|
||||
location *string,
|
||||
startAt time.Time,
|
||||
scenarioId int32,
|
||||
format string,
|
||||
@@ -57,7 +58,7 @@ func (s *GameService) AddGame(
|
||||
if format != "online" && format != "offline" {
|
||||
return 0, errors.New("Формат игры должен быть online или offline")
|
||||
}
|
||||
id, err := s.gamesRepo.AddGame(ctx, name, description, startAt, scenarioId, format)
|
||||
id, err := s.gamesRepo.AddGame(ctx, name, description, location, startAt, scenarioId, format)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -152,6 +153,7 @@ func (s *GameService) UpdateGame(
|
||||
id int,
|
||||
name string,
|
||||
description string,
|
||||
location *string,
|
||||
startAt time.Time,
|
||||
scenarioId int32,
|
||||
format string,
|
||||
@@ -166,7 +168,7 @@ func (s *GameService) UpdateGame(
|
||||
if format != "online" && format != "offline" {
|
||||
return errors.New("Формат игры должен быть online или offline")
|
||||
}
|
||||
return s.gamesRepo.UpdateGame(ctx, id, name, description, startAt, scenarioId, format)
|
||||
return s.gamesRepo.UpdateGame(ctx, id, name, description, location, startAt, scenarioId, format)
|
||||
}
|
||||
|
||||
func (s *GameService) StartGame(ctx context.Context, id int) error {
|
||||
|
||||
Reference in New Issue
Block a user