fix: fixed linting errors
This commit is contained in:
parent
7f782915b6
commit
5dd0db685e
6 changed files with 4 additions and 14 deletions
|
@ -12,8 +12,6 @@ import { requireFields } from './error-helper.js';
|
|||
import { BadRequestException } from '../exceptions/bad-request-exception.js';
|
||||
import { Assignment } from '../entities/assignments/assignment.entity.js';
|
||||
import { EntityDTO } from '@mikro-orm/core';
|
||||
import { createGroup } from '../services/groups.js';
|
||||
import { getLogger } from '../logging/initalize.js';
|
||||
|
||||
export async function getAllAssignmentsHandler(req: Request, res: Response): Promise<void> {
|
||||
const classId = req.params.classid;
|
||||
|
@ -21,8 +19,6 @@ export async function getAllAssignmentsHandler(req: Request, res: Response): Pro
|
|||
|
||||
const assignments = await getAllAssignments(classId, full);
|
||||
|
||||
console.log(JSON.stringify(assignments));
|
||||
|
||||
res.json({ assignments });
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
import { languageMap } from '@dwengo-1/common/util/language';
|
||||
import { FALLBACK_LANG } from '../config.js';
|
||||
import { Assignment } from '../entities/assignments/assignment.entity.js';
|
||||
import { Class } from '../entities/classes/class.entity.js';
|
||||
import { getLogger } from '../logging/initalize.js';
|
||||
import { AssignmentDTO, AssignmentDTOId } from '@dwengo-1/common/interfaces/assignment';
|
||||
import { mapToGroupDTO, mapToGroupDTOId } from './group.js';
|
||||
import { getAssignmentHandler } from '../controllers/assignments.js';
|
||||
import { getAssignmentRepository, getClassRepository } from '../data/repositories.js';
|
||||
import { mapToGroupDTO } from './group.js';
|
||||
import { getAssignmentRepository } from '../data/repositories.js';
|
||||
|
||||
export function mapToAssignmentDTOId(assignment: Assignment): AssignmentDTOId {
|
||||
return {
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
import { Group } from '../entities/assignments/group.entity.js';
|
||||
import { mapToAssignment } from './assignment.js';
|
||||
import { mapToStudent } from './student.js';
|
||||
import { mapToAssignmentDTO } from './assignment.js';
|
||||
import { mapToStudentDTO } from './student.js';
|
||||
import { GroupDTO, GroupDTOId } from '@dwengo-1/common/interfaces/group';
|
||||
import { getGroupRepository } from '../data/repositories.js';
|
||||
import { AssignmentDTO } from '@dwengo-1/common/interfaces/assignment';
|
||||
import { Class } from '../entities/classes/class.entity.js';
|
||||
import { StudentDTO } from '@dwengo-1/common/interfaces/student';
|
||||
import { mapToClassDTO } from './class.js';
|
||||
|
||||
export function mapToGroup(groupDto: GroupDTO, clazz: Class): Group {
|
||||
const assignmentDto = groupDto.assignment as AssignmentDTO;
|
||||
|
|
|
@ -4,7 +4,6 @@ import {
|
|||
getClassRepository,
|
||||
getGroupRepository,
|
||||
getQuestionRepository,
|
||||
getStudentRepository,
|
||||
getSubmissionRepository,
|
||||
} from '../data/repositories.js';
|
||||
import { Assignment } from '../entities/assignments/assignment.entity.js';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { EntityDTO } from '@mikro-orm/core';
|
||||
import { getGroupRepository, getSubmissionRepository } from '../data/repositories.js';
|
||||
import { Group } from '../entities/assignments/group.entity.js';
|
||||
import { mapToGroupDTO, mapToGroupDTOId, mapToShallowGroupDTO } from '../interfaces/group.js';
|
||||
import { mapToGroupDTO, mapToGroupDTOId } from '../interfaces/group.js';
|
||||
import { mapToSubmissionDTO, mapToSubmissionDTOId } from '../interfaces/submission.js';
|
||||
import { GroupDTO, GroupDTOId } from '@dwengo-1/common/interfaces/group';
|
||||
import { SubmissionDTO, SubmissionDTOId } from '@dwengo-1/common/interfaces/submission';
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
getSubmissionRepository,
|
||||
} from '../data/repositories.js';
|
||||
import { mapToClassDTO } from '../interfaces/class.js';
|
||||
import { mapToGroupDTO, mapToGroupDTOId, mapToShallowGroupDTO } from '../interfaces/group.js';
|
||||
import { mapToGroupDTO, mapToGroupDTOId } from '../interfaces/group.js';
|
||||
import { mapToStudent, mapToStudentDTO } from '../interfaces/student.js';
|
||||
import { mapToSubmissionDTO, mapToSubmissionDTOId } from '../interfaces/submission.js';
|
||||
import { getAllAssignments } from './assignments.js';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue