diff --git a/reports/sonar-report.xml b/reports/sonar-report.xml
new file mode 100644
index 0000000..7b51968
--- /dev/null
+++ b/reports/sonar-report.xml
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/trail/trail.service.ts b/src/trail/trail.service.ts
index 85712b9..9953146 100644
--- a/src/trail/trail.service.ts
+++ b/src/trail/trail.service.ts
@@ -82,7 +82,7 @@ export class TrailService {
if (!journey) {
throw new NotFoundException(`Journey with ID ${journeyId} not found`);
}
- return this.trailModel.find({ _id: { $in: journey.trails } }).exec();
+ return await this.trailModel.find({ journey: journeyId }).exec();
}
async updateTrail(id: string, updateData: Partial): Promise {
const trail = await this.trailModel