Commit e2caff22 authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

Merge branch pueblosmagicosconia:main into main

parents 60480607 8229203d
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 −2
Original line number Diff line number Diff line
@@ -7,8 +7,9 @@ export class CreatePlaceDto {
  name: string;
  imageName: string;
  town: Town;
  latitude: number;
  longitude: number;
  latitude: 'decimal';
  longitude: 'decimal';
  address: string;
  openAt: number;
  closeAt: number;
  categories: Category[];
+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;
}
+6 −3
Original line number Diff line number Diff line
@@ -46,11 +46,14 @@ export class Place {
  @Column()
  imageName: string;

  @Column({ nullable: false })
  latitude: number;
  @Column({ nullable: false, type: 'decimal', precision: 10, scale: 8 })
  latitude;

  @Column({ nullable: false, type: 'decimal', precision: 10, scale: 8 })
  longitude;

  @Column({ nullable: false })
  longitude: number;
  address: string;

  @Column({ nullable: false })
  openAt: number;
+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;
  }