refactor(backend): Linting
This commit is contained in:
parent
7155d7d893
commit
4928c08f62
7 changed files with 13 additions and 28 deletions
|
@ -66,7 +66,7 @@ export async function putAssignmentHandler(req: Request, res: Response): Promise
|
|||
res.json({ assignment });
|
||||
}
|
||||
|
||||
export async function deleteAssignmentHandler(req: Request, res: Response): Promise<void> {
|
||||
export async function deleteAssignmentHandler(req: Request, _res: Response): Promise<void> {
|
||||
const id = Number(req.params.id);
|
||||
const classid = req.params.classid;
|
||||
requireFields({ id, classid });
|
||||
|
@ -75,7 +75,7 @@ export async function deleteAssignmentHandler(req: Request, res: Response): Prom
|
|||
throw new BadRequestException('Assignment id should be a number');
|
||||
}
|
||||
|
||||
const assignment = await deleteAssignment(classid, id);
|
||||
await deleteAssignment(classid, id);
|
||||
}
|
||||
|
||||
export async function getAssignmentsSubmissionsHandler(req: Request, res: Response): Promise<void> {
|
||||
|
|
|
@ -3,11 +3,10 @@ import { createGroup, deleteGroup, getAllGroups, getGroup, getGroupSubmissions,
|
|||
import { GroupDTO } from '@dwengo-1/common/interfaces/group';
|
||||
import { requireFields } from './error-helper.js';
|
||||
import { BadRequestException } from '../exceptions/bad-request-exception.js';
|
||||
import { getLogger } from '../logging/initalize.js';
|
||||
import { EntityDTO } from '@mikro-orm/core';
|
||||
import { Group } from '../entities/assignments/group.entity.js';
|
||||
|
||||
function checkGroupFields(classId: any, assignmentId: any, groupId: any) {
|
||||
function checkGroupFields(classId: string, assignmentId: number, groupId: number): void {
|
||||
requireFields({ classId, assignmentId, groupId });
|
||||
|
||||
if (isNaN(assignmentId)) {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { Request, Response } from 'express';
|
||||
import { createSubmission, deleteSubmission, getAllSubmissions, getSubmission } from '../services/submissions.js';
|
||||
import { BadRequestException } from '../exceptions/bad-request-exception.js';
|
||||
import { NotFoundException } from '../exceptions/not-found-exception.js';
|
||||
import { LearningObjectIdentifier } from '../entities/content/learning-object-identifier.js';
|
||||
import { Language, languageMap } from '@dwengo-1/common/util/language';
|
||||
import { SubmissionDTO } from '@dwengo-1/common/interfaces/submission';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue