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

cambiando metodo de findAll a findAllByTown

parent 5b9092e3
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -58,8 +58,10 @@ export class PlaceService {
    await this.availableDateRepository.insert(createDate);
  }

  async findAll() {
    return await this.placeRepository.find();
  async findAllByTown(idTown: number) {
    const town: Town = await this.townRepository.findOneBy({ townId: idTown });
    const places: Place[] = await this.placeRepository.findBy({ idTown: town });
    return places;
  }

  findOne(id: number) {