add get planet data

This commit is contained in:
arnaucube
2019-06-15 21:04:46 +02:00
parent 513836c4c7
commit 3bac070c04
5 changed files with 43 additions and 8 deletions

View File

@@ -49,7 +49,10 @@ func (srv Service) Register(name, password, email string) (*models.User, error)
return nil, err
}
_, _, err = srv.gamesrv.CreatePlanet(user.Id)
_, planet, err := srv.gamesrv.CreatePlanet(user.Id)
user.Planets = append(user.Planets, planet.Id)
user.StoreInDb()
return user, err
}