From a63d615098844ba0dba5f9391bd5bc0ba389af9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Iv=C3=A1n?= <80365304+Diego-lvan@users.noreply.github.com> Date: Tue, 5 Nov 2024 13:23:35 -0600 Subject: [PATCH] agregando town en la respuesta --- backend/src/route/route.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/route/route.service.ts b/backend/src/route/route.service.ts index 3d1c2538..42d58c47 100644 --- a/backend/src/route/route.service.ts +++ b/backend/src/route/route.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Route, RouteStatus } from './entities/route.entity'; -import { DataSource, MoreThan, Repository } from 'typeorm'; +import { DataSource, Repository } from 'typeorm'; import { User } from 'src/user/entities/user.entity'; import { Town } from 'src/town/entities/town.entity'; import { TravelPlaceService } from 'src/travel-place/travel-place.service'; @@ -150,6 +150,7 @@ export class RouteService { .leftJoinAndSelect('route.travelPlace', 'travelPlace') .leftJoinAndSelect('travelPlace.place', 'place') .leftJoinAndSelect('place.visited', 'visited') + .leftJoinAndSelect('place.town', 'town') .where('route.idRoute = :idRoute', { idRoute }) .getOne(); -- GitLab