Skip to content

Commit

Permalink
ft: add preload to courses
Browse files Browse the repository at this point in the history
  • Loading branch information
unewMe committed Nov 23, 2024
1 parent d1d16a2 commit 83f5115
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/app/controllers/courses_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class CoursesController {
async index({ params }: HttpContext) {
const registrationId = decodeURIComponent(params.registration_id)
if (registrationId) {
return await Course.query().where('registrationId', registrationId)
return await Course.query().where('registrationId', registrationId).preload('courses')
}
return []
}
Expand Down

0 comments on commit 83f5115

Please sign in to comment.