Skip to content
Snippets Groups Projects
Commit 7884e53c authored by michael.minelli's avatar michael.minelli
Browse files

Merge branch 'v2.0.0' into main

parents 390c277c 67d5298b
No related branches found
No related tags found
No related merge requests found
Pipeline #26338 passed
...@@ -3,25 +3,25 @@ import LazyVal from '../shared/helpers/LazyVal'; ...@@ -3,25 +3,25 @@ import LazyVal from '../shared/helpers/LazyVal';
import GitlabUser from '../shared/types/Gitlab/GitlabUser'; import GitlabUser from '../shared/types/Gitlab/GitlabUser';
const userBase = Prisma.validator<Prisma.UserArgs>()({ const userBase = Prisma.validator<Prisma.UserDefaultArgs>()({
include: { exercices: true } include: { exercises: true }
}); });
const enonceBase = Prisma.validator<Prisma.EnonceArgs>()({ const assignmentBase = Prisma.validator<Prisma.AssignmentDefaultArgs>()({
include: { include: {
exercices: true, exercises: true,
staff : true staff : true
} }
}); });
const exerciceBase = Prisma.validator<Prisma.ExerciceArgs>()({ const exerciseBase = Prisma.validator<Prisma.ExerciseDefaultArgs>()({
include: { include: {
enonce : true, assignment: true,
members : true, members : true,
results : true results : true
} }
}); });
const resultBase = Prisma.validator<Prisma.ResultArgs>()({ const resultBase = Prisma.validator<Prisma.ResultDefaultArgs>()({
include: { include: {
exercice: true exercise: true
} }
}); });
...@@ -31,6 +31,6 @@ export type User = Omit<Prisma.UserGetPayload<typeof userBase>, 'password'> & { ...@@ -31,6 +31,6 @@ export type User = Omit<Prisma.UserGetPayload<typeof userBase>, 'password'> & {
isTeachingStaff: boolean isTeachingStaff: boolean
gitlabProfile: LazyVal<GitlabUser> gitlabProfile: LazyVal<GitlabUser>
} }
export type Enonce = Prisma.EnonceGetPayload<typeof enonceBase> export type Assignment = Prisma.AssignmentGetPayload<typeof assignmentBase>
export type Exercice = Prisma.ExerciceGetPayload<typeof exerciceBase> export type Exercise = Prisma.ExerciseGetPayload<typeof exerciseBase>
export type Result = Prisma.ResultGetPayload<typeof resultBase> export type Result = Prisma.ResultGetPayload<typeof resultBase>
\ No newline at end of file
enum SecurityCheckType { enum SecurityCheckType {
TEACHING_STAFF = 'teachingStaff', TEACHING_STAFF = 'teachingStaff',
ENONCE_STAFF = 'enonceStaff', ASSIGNMENT_STAFF = 'assignmentStaff',
ENONCE_IS_PUBLISHED = 'enonceIsPublished', ASSIGNMENT_IS_PUBLISHED = 'assignmentIsPublished',
EXERCICE_SECRET = 'exerciceSecret', EXERCISE_SECRET = 'exerciseSecret',
} }
......
import Session from '../../controllers/Session'; import Session from '../../controllers/Session';
import { Enonce, Exercice } from '../DatabaseTypes'; import { Assignment, Exercise } from '../DatabaseTypes';
// to make the file a module and avoid the TypeScript error // to make the file a module and avoid the TypeScript error
export {}; export {};
...@@ -9,7 +9,7 @@ declare global { ...@@ -9,7 +9,7 @@ declare global {
export interface Request { export interface Request {
session: Session, session: Session,
boundParams: { boundParams: {
enonce: Enonce | undefined, exercice: Exercice | undefined assignment: Assignment | undefined, exercise: Exercise | undefined
} }
} }
} }
......
LICENSE 0 → 100644
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment