diff --git a/internal/pkg/adverts/delivery/grpc/grpc.go b/internal/pkg/adverts/delivery/grpc/grpc.go index ee3df53..e33664a 100644 --- a/internal/pkg/adverts/delivery/grpc/grpc.go +++ b/internal/pkg/adverts/delivery/grpc/grpc.go @@ -78,7 +78,6 @@ func (h *AdvertsServerHandler) GetAdvertById(ctx context.Context, req *genAdvert var houseProperties *gen.HouseProperties = nil var flatProperties *gen.FlatProperties = nil var complexProperties *gen.ComplexAdvertProperties = nil - if advert.HouseProperties != nil { switch advert.HouseProperties.StatusArea { case "IHC": diff --git a/internal/pkg/adverts/delivery/http/http.go b/internal/pkg/adverts/delivery/http/http.go index 3e34107..c00f672 100644 --- a/internal/pkg/adverts/delivery/http/http.go +++ b/internal/pkg/adverts/delivery/http/http.go @@ -232,7 +232,7 @@ func (h *AdvertsClientHandler) GetAdvertById(w http.ResponseWriter, r *http.Requ } if advertDataResponse.FlatProperties != nil { - flatProperties = &models.FlatProperties{CeilingHeight: advertDataResponse.FlatProperties.CeilingHeight, RoomCount: int(advertDataResponse.FlatProperties.RoomCount), FloorGeneral: int(advertDataResponse.FlatProperties.FloorGeneral), Apartment: advertDataResponse.FlatProperties.Apartment, SquareGeneral: advertDataResponse.FlatProperties.SquareGeneral, Floor: int(advertDataResponse.HouseProperties.Floor), SquareResidential: advertDataResponse.FlatProperties.SquareResidential} + flatProperties = &models.FlatProperties{CeilingHeight: advertDataResponse.FlatProperties.CeilingHeight, RoomCount: int(advertDataResponse.FlatProperties.RoomCount), FloorGeneral: int(advertDataResponse.FlatProperties.FloorGeneral), Apartment: advertDataResponse.FlatProperties.Apartment, SquareGeneral: advertDataResponse.FlatProperties.SquareGeneral, Floor: int(advertDataResponse.FlatProperties.Floor), SquareResidential: advertDataResponse.FlatProperties.SquareResidential} } if advertDataResponse.ComplexProperties != nil {