From 27de41221f7e1045eb0840d0e6da09dec54f1a08 Mon Sep 17 00:00:00 2001 From: Lars Date: Tue, 26 Nov 2024 10:35:50 +0100 Subject: [PATCH] fix: stringify editor state before saving to database --- src/backend/editor-route-handlers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/editor-route-handlers.ts b/src/backend/editor-route-handlers.ts index 402148c..30d6066 100644 --- a/src/backend/editor-route-handlers.ts +++ b/src/backend/editor-route-handlers.ts @@ -66,7 +66,7 @@ export async function putEntity(req: Request, res: Response) { // Modify entity with decodedAccessToken.entityId in database await database.mutate('UPDATE lti_entity SET content = ? WHERE id = ?', [ - req.body.editorState, + JSON.stringify(req.body.editorState), decodedAccessToken.entityId, ]) logger.info(