diff --git a/backend/grading-service/src/services/get-handler.ts b/backend/grading-service/src/services/get-handler.ts index a9e9971d..36192268 100644 --- a/backend/grading-service/src/services/get-handler.ts +++ b/backend/grading-service/src/services/get-handler.ts @@ -1,6 +1,6 @@ import NotExistingStudentError from "../libs/errors/NotExistingStudentError"; import db from "../models/db"; -import { Submission } from "../types/grading-service"; +import { Submission, SubmissionInfo, Submitter } from "../types/grading-service"; const getSubmissionsByQuestionIdAndStudentId = async ( questionId: string, @@ -110,12 +110,6 @@ const getLatestSubmissionByQuestionIdAndStudentId = async ( }; }; -interface Submitter { - studentId: number; - name: string; - createdOn: number; -} - const getSubmittersByAssignmentId = async ( assignmentId: string ): Promise => { @@ -161,11 +155,6 @@ const getSubmittersByAssignmentId = async ( }); }; -interface SubmissionInfo { - questionId: string; - createdOn: number; -} - const getSubmissionInfo = async ( assignmentId: string, studentId: number diff --git a/backend/grading-service/src/types/grading-service.d.ts b/backend/grading-service/src/types/grading-service.d.ts index 151b1fab..89ad947e 100644 --- a/backend/grading-service/src/types/grading-service.d.ts +++ b/backend/grading-service/src/types/grading-service.d.ts @@ -8,6 +8,17 @@ export interface Submission { createdOn: number; } +export interface SubmissionInfo { + questionId: string; + createdOn: number; +} + +export interface Submitter { + studentId: number; + name: string; + createdOn: number; +} + export interface Feedback { line: number; hints: string[];