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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user