Skip to content

Commit

Permalink
refactor(review): use common expression snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
inhibitor1217 committed Mar 20, 2024
1 parent e5d7386 commit 361cb43
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions src/prisma/repositories/review.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {
} from '@prisma/client';
import { EReview } from 'src/common/entities/EReview';
import { orderFilter } from 'src/common/utils/search.utils';
import { ECourse } from '../../common/entities/ECourse';
import { ELecture } from '../../common/entities/ELecture';
import {
LectureDetails,
ReviewDetails,
Expand Down Expand Up @@ -188,22 +190,8 @@ export class ReviewsRepository {
},
},
include: {
course: {
include: {
subject_department: true,
subject_course_professors: { include: { professor: true } },
lecture: true,
subject_courseuser: true,
},
},
lecture: {
include: {
subject_department: true,
subject_lecture_professors: { include: { professor: true } },
subject_classtime: true,
subject_examtime: true,
},
},
course: ECourse.Details,
lecture: ELecture.Details,
review_reviewvote: true,
},
skip: offset,
Expand Down

0 comments on commit 361cb43

Please sign in to comment.