update person models
This commit is contained in:
@@ -17,7 +17,7 @@ import (
|
||||
// 200: Event
|
||||
|
||||
func (h *Handler) CreateEvent(c echo.Context) (err error) {
|
||||
var person *model.PersonalInformation
|
||||
var person *model.PersonalInformationApi
|
||||
event := new(model.CreateEvent)
|
||||
authorId, err := uuid.Parse(c.Request().Header.Get("UserId"))
|
||||
orgId, err := uuid.Parse(c.Request().Header.Get("UserOrganizationId"))
|
||||
@@ -38,7 +38,7 @@ func (h *Handler) CreateEvent(c echo.Context) (err error) {
|
||||
return c.NoContent(http.StatusBadRequest)
|
||||
}
|
||||
} else {
|
||||
newPerson := model.PersonalInformationCreate{
|
||||
newPerson := model.PersonalInformationApi{
|
||||
FirstName: event.Person.FirstName,
|
||||
LastName: event.Person.LastName,
|
||||
Patronymic: event.Person.Patronymic,
|
||||
@@ -71,7 +71,7 @@ func (h *Handler) CreateEvent(c echo.Context) (err error) {
|
||||
newEvent.MedicId = event.MedicId
|
||||
newEvent.AuthorId = authorId
|
||||
newEvent.PersonId = person.ID
|
||||
newEvent.Person = *person
|
||||
newEvent.Person = person
|
||||
|
||||
tx := h.DB.Create(&newEvent)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user