generated from VLADIMIR/template
add games
This commit is contained in:
Binary file not shown.
@@ -20,7 +20,6 @@ func NewGenerator(length int) IPasswordGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *generator) Generate() (string, error) {
|
func (g *generator) Generate() (string, error) {
|
||||||
return "1", nil
|
|
||||||
password := make([]byte, g.length)
|
password := make([]byte, g.length)
|
||||||
for i := range password {
|
for i := range password {
|
||||||
num, err := rand.Int(rand.Reader, big.NewInt(int64(len(charset))))
|
num, err := rand.Int(rand.Reader, big.NewInt(int64(len(charset))))
|
||||||
|
|||||||
@@ -174,6 +174,15 @@ func (s *ScenarioService) updateStory(ctx context.Context, id int, story *storyt
|
|||||||
return errors.New("Такой код точки уже существует")
|
return errors.New("Такой код точки уже существует")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cleanPlaces := make([]*storytelling.Place, 0, len(story.Places))
|
||||||
|
for _, place := range story.Places {
|
||||||
|
if place.Code == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
cleanPlaces = append(cleanPlaces, place)
|
||||||
|
}
|
||||||
|
story.Places = cleanPlaces
|
||||||
|
|
||||||
storyString, err := convertStory(story)
|
storyString, err := convertStory(story)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user