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

formatenado codigo

parent 94e6cd2f
Loading
Loading
Loading
Loading
+24 −28
Original line number Diff line number Diff line
@@ -151,21 +151,19 @@ export class PointOfInterestService {
    if (!place) {
      throw new BadRequestException('Place not found');
    }
    let points: printPointInfo[] = await Promise.all(pointsId.map(async (idPoint)=>{
      let point = await this.dataSource
    const points: printPointInfo[] = await Promise.all(
      pointsId.map(async (idPoint) => {
        const point = await this.dataSource
          .getRepository(PointOfInterest)
          .createQueryBuilder('point')
          .leftJoin('point.idPlace', 'place')
      .select([
        'point.idPoint as idPoint',
        'place.name as namePlace',
        'point.name as name',
      ])
          .select(['point.idPoint as idPoint', 'place.name as namePlace', 'point.name as name'])
          .where('place.idPlace = :idPlace', { idPlace })
          .andWhere('point.idPoint = :idPoint', { idPoint })
          .getRawOne();
        return point;
    }))
      }),
    );
    return points;
  }

@@ -194,16 +192,14 @@ export class PointOfInterestService {

      cardsHtml += `
        <div class="card">
          <img class="background" src="data:image/jpeg;base64,${
            readFileSync('./src/pointOfInterest/utils/zac.jpeg').toString('base64')
          }"/>
          <img class="background" src="data:image/jpeg;base64,${readFileSync(
            './src/pointOfInterest/utils/zac.jpeg',
          ).toString('base64')}"/>
          <div class="content">
            <h3>${point.namePlace}</h3>
            <p>${point.name}</p>
          </div>
          <img src="data:image/jpeg;base64,${
            readFileSync(filePath).toString('base64')
          }" class="qr-code"/>
          <img src="data:image/jpeg;base64,${readFileSync(filePath).toString('base64')}" class="qr-code"/>
        </div>
      `;
    }