Skip to content

Commit

Permalink
error fix getting flat advert
Browse files Browse the repository at this point in the history
  • Loading branch information
vovangy committed May 8, 2024
1 parent 8eaeb26 commit e08a9a0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion internal/pkg/adverts/delivery/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/adverts/delivery/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e08a9a0

Please sign in to comment.