fix campaign rules
This commit is contained in:
@@ -34,6 +34,15 @@ func ToGamePlayResponses(gamePlays []entities.GamePlay) []models.GamePlayRespons
|
||||
return responses
|
||||
}
|
||||
|
||||
// ToGamePlayResponsesFromPointers converts a slice of game play entity pointers to game play responses
|
||||
func ToGamePlayResponsesFromPointers(gamePlays []*entities.GamePlay) []models.GamePlayResponse {
|
||||
responses := make([]models.GamePlayResponse, len(gamePlays))
|
||||
for i, gp := range gamePlays {
|
||||
responses[i] = *ToGamePlayResponse(gp)
|
||||
}
|
||||
return responses
|
||||
}
|
||||
|
||||
// ToGamePlayEntity converts a create game play request to a game play entity
|
||||
func ToGamePlayEntity(req *models.CreateGamePlayRequest) *entities.GamePlay {
|
||||
return &entities.GamePlay{
|
||||
|
||||
Reference in New Issue
Block a user