logs fix
This commit is contained in:
@@ -73,7 +73,7 @@ func (h *Handler) CreateEvent(c echo.Context) (err error) {
|
|||||||
newEvent.MedicId = event.MedicId
|
newEvent.MedicId = event.MedicId
|
||||||
newEvent.AuthorId = authorId
|
newEvent.AuthorId = authorId
|
||||||
newEvent.PersonId = person.ID
|
newEvent.PersonId = person.ID
|
||||||
newEvent.Person = person
|
newEvent.Person = *person
|
||||||
|
|
||||||
tx := h.DB.Create(&newEvent)
|
tx := h.DB.Create(&newEvent)
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ type Event struct {
|
|||||||
AuthorId uuid.UUID `json:"-"`
|
AuthorId uuid.UUID `json:"-"`
|
||||||
Medic User `json:"medic" gorm:"-"`
|
Medic User `json:"medic" gorm:"-"`
|
||||||
MedicId uuid.UUID `json:"-"`
|
MedicId uuid.UUID `json:"-"`
|
||||||
Person *PersonalInformationApi `json:"person" gorm:"-"`
|
Person PersonalInformationApi `json:"person" gorm:"-"`
|
||||||
PersonId uuid.UUID `json:"-"`
|
PersonId uuid.UUID `json:"-"`
|
||||||
OrgId uuid.UUID `json:"-"`
|
OrgId uuid.UUID `json:"-"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,9 +53,9 @@ func CreatePerson(person model.PersonalInformationApi, header http.Header, c ech
|
|||||||
return pi, nil
|
return pi, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetPersons(ids []uuid.UUID, header http.Header, c echo.Context) (map[uuid.UUID]*model.PersonalInformationApi, error) {
|
func GetPersons(ids []uuid.UUID, header http.Header, c echo.Context) (map[uuid.UUID]model.PersonalInformationApi, error) {
|
||||||
var persons []model.PersonalInformationApi
|
var persons []model.PersonalInformationApi
|
||||||
personsMap := make(map[uuid.UUID]*model.PersonalInformationApi)
|
personsMap := make(map[uuid.UUID]model.PersonalInformationApi)
|
||||||
|
|
||||||
data, err, req := api.PostRequest(
|
data, err, req := api.PostRequest(
|
||||||
config.Env.MSHosts.PersonsHost+"/persons/batch/",
|
config.Env.MSHosts.PersonsHost+"/persons/batch/",
|
||||||
@@ -75,7 +75,7 @@ func GetPersons(ids []uuid.UUID, header http.Header, c echo.Context) (map[uuid.U
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, person := range persons {
|
for _, person := range persons {
|
||||||
personsMap[person.ID] = &person
|
personsMap[person.ID] = person
|
||||||
}
|
}
|
||||||
|
|
||||||
return personsMap, nil
|
return personsMap, nil
|
||||||
|
|||||||
Reference in New Issue
Block a user