From 4e6f7ccb3d19a32c32ae035382be0b9b24eb0678 Mon Sep 17 00:00:00 2001 From: Adriaan Jacquet Date: Sun, 6 Apr 2025 22:21:53 +0200 Subject: [PATCH] fix: errors in vorige commit gefixt --- backend/src/controllers/classes.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/controllers/classes.ts b/backend/src/controllers/classes.ts index c6b71ad2..269259aa 100644 --- a/backend/src/controllers/classes.ts +++ b/backend/src/controllers/classes.ts @@ -15,6 +15,8 @@ import { } from '../services/classes.js'; import { ClassDTO } from '@dwengo-1/common/interfaces/class'; import {requireFields} from "./error-helper"; +import { EntityDTO } from '@mikro-orm/core'; +import { Class } from '../entities/classes/class.entity.js'; export async function getAllClassesHandler(req: Request, res: Response): Promise { const full = req.query.full === 'true'; @@ -46,7 +48,7 @@ export async function putClassHandler(req: Request, res: Response): Promise; + const newData = req.body as Partial>; const cls = await putClass(classId, newData); res.json({ class: cls });