generated from VLADIMIR/template
add file prefix
This commit is contained in:
@@ -9,13 +9,16 @@ import (
|
||||
|
||||
type ScenarioService struct {
|
||||
scenariosRepo *scenarios_repo.ScenariosRepo
|
||||
domain string
|
||||
}
|
||||
|
||||
func NewScenarioService(
|
||||
scenariosRepo *scenarios_repo.ScenariosRepo,
|
||||
domain string,
|
||||
) *ScenarioService {
|
||||
return &ScenarioService{
|
||||
scenariosRepo: scenariosRepo,
|
||||
domain: domain,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +42,7 @@ func (s *ScenarioService) GetScenariosByAuthorID(
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return mapScenarios(scenarios)
|
||||
return mapScenarios(scenarios, s.domain)
|
||||
}
|
||||
|
||||
func (s *ScenarioService) GetScenarioByID(
|
||||
@@ -50,7 +53,7 @@ func (s *ScenarioService) GetScenarioByID(
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return mapScenario(scenario)
|
||||
return mapScenario(scenario, s.domain)
|
||||
}
|
||||
|
||||
func (s *ScenarioService) UpdateScenarioByID(
|
||||
|
||||
Reference in New Issue
Block a user