diff --git a/backend/src/data/assignments/submission-repository.ts b/backend/src/data/assignments/submission-repository.ts index d904e77f..371dd4ef 100644 --- a/backend/src/data/assignments/submission-repository.ts +++ b/backend/src/data/assignments/submission-repository.ts @@ -17,7 +17,6 @@ export class SubmissionRepository extends DwengoEntityRepository { }); } -<<<<<<< HEAD public findByLearningObject(loId: LearningObjectIdentifier): Promise { return this.find({ learningObjectHruid: loId.hruid, @@ -27,9 +26,6 @@ export class SubmissionRepository extends DwengoEntityRepository { } public findMostRecentSubmissionForStudent(loId: LearningObjectIdentifier, submitter: Student): Promise { -======= - public async findMostRecentSubmissionForStudent(loId: LearningObjectIdentifier, submitter: Student): Promise { ->>>>>>> 6c3dbc99bb1afb79fa867505e52656c49bada1b6 return this.findOne( { learningObjectHruid: loId.hruid, diff --git a/backend/src/data/questions/question-repository.ts b/backend/src/data/questions/question-repository.ts index 0055ac78..246b0484 100644 --- a/backend/src/data/questions/question-repository.ts +++ b/backend/src/data/questions/question-repository.ts @@ -56,18 +56,18 @@ export class QuestionRepository extends DwengoEntityRepository { }); } -<<<<<<< HEAD public findAllByAssignment(assignment: Assignment): Promise { return this.find({ author: assignment.groups.flatMap(group => group.members), learningObjectHruid: assignment.learningPathHruid, learningObjectLanguage: assignment.learningPathLanguage, -======= + }); + } + public async findAllByAuthor(author: Student): Promise { return this.findAll({ where: { author }, orderBy: { timestamp: 'DESC' }, // New to old ->>>>>>> 6c3dbc99bb1afb79fa867505e52656c49bada1b6 }); } } diff --git a/backend/src/routes/groups.ts b/backend/src/routes/groups.ts index 231dec2e..81532a90 100644 --- a/backend/src/routes/groups.ts +++ b/backend/src/routes/groups.ts @@ -12,15 +12,5 @@ router.post('/', createGroupHandler); router.get('/:groupid', getGroupHandler); router.get('/:groupid/submissions', getGroupSubmissionsHandler); -<<<<<<< HEAD -======= - -// The list of questions a group has made -router.get('/:id/questions', (_req, res) => { - res.json({ - questions: ['0'], - }); -}); ->>>>>>> 6c3dbc99bb1afb79fa867505e52656c49bada1b6 export default router; diff --git a/backend/src/routes/submissions.ts b/backend/src/routes/submissions.ts index fac0b834..7c91de52 100644 --- a/backend/src/routes/submissions.ts +++ b/backend/src/routes/submissions.ts @@ -3,15 +3,7 @@ import { createSubmissionHandler, deleteSubmissionHandler, getAllSubmissionsHand const router = express.Router({ mergeParams: true }); // Root endpoint used to search objects -<<<<<<< HEAD router.get('/', getAllSubmissionsHandler); -======= -router.get('/', (_req, res) => { - res.json({ - submissions: ['0', '1'], - }); -}); ->>>>>>> 6c3dbc99bb1afb79fa867505e52656c49bada1b6 router.post('/:id', createSubmissionHandler);