Commit 36713035 authored by Diego Iván's avatar Diego Iván
Browse files

agregando campo address en un place

parent 13c5f826
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -26,11 +26,14 @@ export class CreatePlaceDateTradDto {
  @ApiProperty({ type: 'string', format: 'binary' })
  image;

  @ApiProperty()
  latitude: number;
  @ApiProperty({ type: 'decimal' })
  latitude;

  @ApiProperty({ type: 'decimal' })
  longitude;

  @ApiProperty()
  longitude: number;
  address: string;

  // 24-hour format
  @ApiProperty({ maximum: 24, minimum: 0 })
+3 −0
Original line number Diff line number Diff line
@@ -27,4 +27,7 @@ export class GetPlaceDto {
  endDate: Date;
  @ApiProperty()
  categories: any[];

  @ApiProperty()
  address: string;
}
+3 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ export class PlaceService {
      openAt: createPlaceDto.openAt,
      imageName: createPlaceDto.image.filename,
      categories: categories,
      address: createPlaceDto.address,
    };

    if (!town) {
@@ -105,6 +106,7 @@ export class PlaceService {
        endDate: place.availableDates[0]?.endDate || null,
        categories: place.categories,
        description: place.placeTraduction[0].description,
        address: place.address,
      };
    });
    return places;
@@ -140,6 +142,7 @@ export class PlaceService {
      endDate: place.availableDates[0]?.endDate,
      categories: place.categories,
      description: place.placeTraduction[0].description,
      address: place.address,
    };
    return res;
  }