Skip to content

Commit

Permalink
hotfix: add forgotten facilityId on two pages
Browse files Browse the repository at this point in the history
9 minutes
  • Loading branch information
c0repwn3r committed Aug 20, 2024
1 parent 182fe54 commit 31ecf81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/(hq)/[id]/training/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const load: PageServerLoad = async ({ parent, params }) => {
}),
sessions: reversed(
await prisma.trainingSession.findMany({
where: { studentId: user.id },
where: { studentId: user.id, facilityId: params.id },
include: {
plan: true,
mentor: true,
Expand All @@ -50,7 +50,7 @@ export const load: PageServerLoad = async ({ parent, params }) => {
),
mentorSessions: reversed(
await prisma.trainingSession.findMany({
where: { mentorId: user.id },
where: { mentorId: user.id, facilityId: params.id },
include: {
plan: true,
student: true,
Expand Down
3 changes: 3 additions & 0 deletions src/routes/(hq)/[id]/training/plans/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export const load: PageServerLoad = async ({ params, cookies }) => {

return {
plans: await prisma.trainingPlan.findMany({
where: {
facilityId: params.id
},
include: {
TrainingPlanRegistration: true,
},
Expand Down

0 comments on commit 31ecf81

Please sign in to comment.