Merge branch 'dev' into refactor/common
This commit is contained in:
commit
a4408b5bc0
145 changed files with 3437 additions and 2822 deletions
|
@ -3,7 +3,7 @@ import { createAssignment, getAllAssignments, getAssignment, getAssignmentsSubmi
|
|||
|
||||
import { AssignmentDTO } from 'dwengo-1-common/src/interfaces/assignment';
|
||||
|
||||
// Typescript is annoy with with parameter forwarding from class.ts
|
||||
// Typescript is annoying with parameter forwarding from class.ts
|
||||
interface AssignmentParams {
|
||||
classid: string;
|
||||
id: string;
|
||||
|
@ -42,7 +42,7 @@ export async function createAssignmentHandler(req: Request<AssignmentParams>, re
|
|||
}
|
||||
|
||||
export async function getAssignmentHandler(req: Request<AssignmentParams>, res: Response): Promise<void> {
|
||||
const id = +req.params.id;
|
||||
const id = Number(req.params.id);
|
||||
const classid = req.params.classid;
|
||||
|
||||
if (isNaN(id)) {
|
||||
|
@ -62,7 +62,7 @@ export async function getAssignmentHandler(req: Request<AssignmentParams>, res:
|
|||
|
||||
export async function getAssignmentsSubmissionsHandler(req: Request<AssignmentParams>, res: Response): Promise<void> {
|
||||
const classid = req.params.classid;
|
||||
const assignmentNumber = +req.params.id;
|
||||
const assignmentNumber = Number(req.params.id);
|
||||
const full = req.query.full === 'true';
|
||||
|
||||
if (isNaN(assignmentNumber)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue