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.
This commit is contained in:
Torsten Schulz (local)
2026-01-15 08:16:04 +01:00
parent e852346b94
commit ba469ef900

View File

@@ -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) {