diff --git a/src/controller/admin/qualificationController.ts b/src/controller/admin/qualificationController.ts index 7027dd7..1164b2a 100644 --- a/src/controller/admin/qualificationController.ts +++ b/src/controller/admin/qualificationController.ts @@ -53,9 +53,11 @@ export async function getQualificationAssignedMembers(req: Request, res: Respons */ export async function createQualification(req: Request, res: Response): Promise { const qualification = req.body.qualification; + const description = req.body.description; let createQualification: CreateQualificationCommand = { qualification: qualification, + description: description, }; await QualificationCommandHandler.create(createQualification); @@ -71,10 +73,12 @@ export async function createQualification(req: Request, res: Response): Promise< export async function updateQualification(req: Request, res: Response): Promise { const id = parseInt(req.params.id); const qualification = req.body.qualification; + const description = req.body.description; let updateQualification: UpdateQualificationCommand = { id: id, qualification: qualification, + description: description, }; await QualificationCommandHandler.update(updateQualification); diff --git a/src/factory/admin/communicationType.ts b/src/factory/admin/communicationType.ts index a16efa1..5ee28ea 100644 --- a/src/factory/admin/communicationType.ts +++ b/src/factory/admin/communicationType.ts @@ -11,7 +11,7 @@ export default abstract class CommunicationTypeFactory { return { id: record.id, type: record.type, - useColumns: record.useColumns, + fields: record.useColumns, }; } diff --git a/src/middleware/errorHandler.ts b/src/middleware/errorHandler.ts index 7b121ff..e3ce2ec 100644 --- a/src/middleware/errorHandler.ts +++ b/src/middleware/errorHandler.ts @@ -5,15 +5,13 @@ import CustomRequestException from "../exceptions/customRequestException"; export default function errorHandler(err: ExceptionBase | Error, req: Request, res: Response, next: Function) { let status = 500; let msg = "Internal Server Error"; - let insideError = undefined; if (err instanceof CustomRequestException) { status = err.statusCode; msg = err.message; - insideError = err.err; } - console.log("Handler", err, insideError); + console.log("Handler", err); res.status(status).send(msg); } diff --git a/src/viewmodel/admin/communicationType.models.ts b/src/viewmodel/admin/communicationType.models.ts index b2113a8..ac46507 100644 --- a/src/viewmodel/admin/communicationType.models.ts +++ b/src/viewmodel/admin/communicationType.models.ts @@ -1,5 +1,5 @@ export interface CommunicationTypeViewModel { id: number; type: string; - useColumns: Array; + fields: Array; }