add missing path property handling
This commit is contained in:
@@ -51,6 +51,7 @@ type Hamster struct {
|
||||
Child []*Hamster `json:"childs"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
Cage *Cage `json:"cage"`
|
||||
}
|
||||
|
||||
func (h *Hamster) Die() {
|
||||
@@ -90,9 +91,8 @@ func (h *Hamster) Fuck(another *Hamster) (bool, error) {
|
||||
female, male := func() (*Hamster, *Hamster) {
|
||||
if h.Sexe == FEMALE {
|
||||
return h, another
|
||||
} else {
|
||||
return another, h
|
||||
}
|
||||
return another, h
|
||||
}()
|
||||
female.GestationFather = male
|
||||
female.Gestation = true
|
||||
@@ -147,9 +147,8 @@ func randSexe() string {
|
||||
return func() string {
|
||||
if randNumber(1, 2) == 2 {
|
||||
return MALE
|
||||
} else {
|
||||
return FEMALE
|
||||
}
|
||||
return FEMALE
|
||||
}()
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ type User struct {
|
||||
ID string `json:"id"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt *time.Time `json:"updatedAt"`
|
||||
GoogleId string `json:"-"`
|
||||
GoogleID string `json:"-"`
|
||||
Games []Game
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ type UserData struct {
|
||||
}
|
||||
|
||||
type UserDataEditable struct {
|
||||
UserId string `json:'userId'`
|
||||
UserID string `json:'userID'`
|
||||
Type string `json:"type"`
|
||||
Name string `json:"name"`
|
||||
Content string `json:"content"`
|
||||
|
||||
Reference in New Issue
Block a user