From ba469ef900013159026258fde9e4226786e73824 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Thu, 15 Jan 2026 08:16:04 +0100 Subject: [PATCH] Refactor notification handling in FalukantService to improve data processing - Convert notification rows to plain objects before enriching with character names, ensuring compatibility with subsequent processing. - Update return structure to include plain notification objects, enhancing data consistency in the response. --- backend/services/falukantService.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/services/falukantService.js b/backend/services/falukantService.js index 10ccebf..7b13dc1 100644 --- a/backend/services/falukantService.js +++ b/backend/services/falukantService.js @@ -5583,9 +5583,11 @@ class FalukantService extends BaseService { limit, }); - await enrichNotificationsWithCharacterNames(rows); + // Convert to plain objects so we can add properties + const plainRows = rows.map(r => r.get({ plain: true })); + await enrichNotificationsWithCharacterNames(plainRows); - return { items: rows, total: count, page: Number(page) || 1, size: limit }; + return { items: plainRows, total: count, page: Number(page) || 1, size: limit }; } async markNotificationsShown(hashedUserId) {