Skip to content

Commit

Permalink
Merge pull request ThreeDotsLabs#7 from blaggacao/patch-1
Browse files Browse the repository at this point in the history
Update training.go
  • Loading branch information
m110 authored Nov 11, 2020
2 parents 1ef126e + c1f8c6b commit 186a2c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (r TrainingsFirestoreRepository) unmarshalTraining(doc *firestore.DocumentS
proposedTime = *trainingModel.ProposedTime
}

return training.UnmarshalHourFromDatabase(
return training.UnmarshalTrainingFromDatabase(
trainingModel.UUID,
trainingModel.UserUUID,
trainingModel.User,
Expand Down
6 changes: 3 additions & 3 deletions internal/trainings/domain/training/training.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ func NewTraining(uuid string, userUUID string, userName string, trainingTime tim
}, nil
}

// UnmarshalHourFromDatabase unmarshals Training from the database.
// UnmarshalTrainingFromDatabase unmarshals Training from the database.
//
// It should be used only for unmarshalling from the database!
// You can't use UnmarshalHourFromDatabase as constructor - It may put domain into the invalid state!
func UnmarshalHourFromDatabase(
// You can't use UnmarshalTrainingFromDatabase as constructor - It may put domain into the invalid state!
func UnmarshalTrainingFromDatabase(
uuid string,
userUUID string,
userName string,
Expand Down

0 comments on commit 186a2c4

Please sign in to comment.