Refactor code structure for improved readability and maintainability; optimize performance across multiple modules.
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s

This commit is contained in:
Torsten Schulz (local)
2026-07-21 09:08:15 +02:00
parent 75b52de282
commit 1ab9407e79
1400 changed files with 22278 additions and 485 deletions

0
backend/utils/checkRightsTable.js Normal file → Executable file
View File

0
backend/utils/cleanupDatabaseConstraints.js Normal file → Executable file
View File

0
backend/utils/crypto.js Normal file → Executable file
View File

0
backend/utils/encryption.js Normal file → Executable file
View File

0
backend/utils/falukant/falukantProductEconomy.js Normal file → Executable file
View File

0
backend/utils/falukant/initializeFalukantPredefines.js Normal file → Executable file
View File

0
backend/utils/falukant/initializeFalukantTypes.js Normal file → Executable file
View File

0
backend/utils/fixMatch3Data.js Normal file → Executable file
View File

0
backend/utils/i18n.js Normal file → Executable file
View File

0
backend/utils/initializeChat.js Normal file → Executable file
View File

0
backend/utils/initializeFalukant.js Normal file → Executable file
View File

0
backend/utils/initializeForum.js Normal file → Executable file
View File

0
backend/utils/initializeImageTypes.js Normal file → Executable file
View File

0
backend/utils/initializeMatch3.js Normal file → Executable file
View File

0
backend/utils/initializeMatch3TileTypes.js Normal file → Executable file
View File

0
backend/utils/initializeSettings.js Normal file → Executable file
View File

0
backend/utils/initializeTaxi.js Normal file → Executable file
View File

0
backend/utils/initializeTypes.js Normal file → Executable file
View File

0
backend/utils/initializeUserRights.js Normal file → Executable file
View File

0
backend/utils/initializeWidgetTypes.js Normal file → Executable file
View File

0
backend/utils/locales/de.json Normal file → Executable file
View File

0
backend/utils/locales/en.json Normal file → Executable file
View File

0
backend/utils/redis.js Normal file → Executable file
View File

0
backend/utils/sequelize.js Normal file → Executable file
View File

18
backend/utils/socket.js Normal file → Executable file
View File

@@ -1,5 +1,6 @@
import { Server } from 'socket.io';
import BaseService from '../services/BaseService.js';
import { dispatchRealtimeEvent } from '../services/pushNotificationService.js';
const baseService = new BaseService();
@@ -46,23 +47,22 @@ export function getUserSockets() {
export async function notifyUser(recipientHashedUserId, event, data) {
const io = getIo();
if (!io) {
if (DEBUG_SOCKETS) console.warn('[socket.io] notifyUser übersprungen: Socket.io nicht initialisiert');
return;
}
const userSockets = getUserSockets();
try {
const recipientUser = await baseService.getUserByHashedId(recipientHashedUserId);
if (recipientUser) {
const socketId = userSockets[recipientUser.hashedId];
if (socketId) {
const recipientUser = await baseService.getUserByHashedId(recipientHashedUserId);
if (recipientUser) {
const socketId = userSockets[recipientUser.hashedId];
if (socketId && io) {
if (DEBUG_SOCKETS) console.log('[socket.io] notifyUser → emit:', event, 'to socket', socketId, 'user', recipientUser.hashedId, 'data:', JSON.stringify(data));
setTimeout(() => {
io.to(socketId).emit(event, data);
}, 250);
} else {
} else if (DEBUG_SOCKETS) {
if (DEBUG_SOCKETS) console.warn('[socket.io] notifyUser: no socket registered for user', recipientUser.hashedId);
}
void dispatchRealtimeEvent(recipientUser.hashedId, event, data).catch((error) => {
console.error('[push] Realtime-Ereignis konnte nicht zugestellt werden:', error.message);
});
} else {
if (DEBUG_SOCKETS) console.log(`Benutzer mit gehashter ID ${recipientHashedUserId} nicht gefunden.`);
}

0
backend/utils/storagePaths.js Normal file → Executable file
View File

0
backend/utils/syncDatabase.js Normal file → Executable file
View File

0
backend/utils/updateExistingMatch3Levels.js Normal file → Executable file
View File

0
backend/utils/updateMatch3LevelsWithTileTypes.js Normal file → Executable file
View File

0
backend/utils/userdata.js Normal file → Executable file
View File