Report fix from PR
MODIFY
src/migration/tasks/AddNotificationsFlagsToUsersTask.ts
src/migration/tasks/AddNotificationsFlagsToUsersTask.ts
@@ -49,24 +49,24 @@ export default class AddNotificationsFlagsToUsersTask extends MigrationTask {
for (const user of users) {
// Keep current setting
user.notifications = {
- sendSessionStarted: user.notifications.sendSessionStarted ? user.notifications.sendSessionStarted : false,
- sendOptimalChargeReached: user.notifications.sendOptimalChargeReached ? user.notifications.sendOptimalChargeReached : false,
- sendEndOfCharge: user.notifications.sendEndOfCharge ? user.notifications.sendEndOfCharge : false,
- sendEndOfSession: user.notifications.sendEndOfSession ? user.notifications.sendEndOfSession : false,
- sendUserAccountStatusChanged: user.notifications.sendUserAccountStatusChanged ? user.notifications.sendUserAccountStatusChanged : false,
- sendSessionNotStarted: user.notifications.sendSessionNotStarted ? user.notifications.sendSessionNotStarted : false,
- sendUserAccountInactivity: user.notifications.sendUserAccountInactivity ? user.notifications.sendUserAccountInactivity : false,
- sendPreparingSessionNotStarted: user.notifications.sendPreparingSessionNotStarted ? user.notifications.sendPreparingSessionNotStarted : false,
- sendNewRegisteredUser: user.notifications.sendNewRegisteredUser ? user.notifications.sendNewRegisteredUser : false,
- sendUnknownUserBadged: user.notifications.sendUnknownUserBadged ? user.notifications.sendUnknownUserBadged : false,
- sendChargingStationStatusError: user.notifications.sendChargingStationStatusError ? user.notifications.sendChargingStationStatusError : false,
- sendChargingStationRegistered: user.notifications.sendChargingStationRegistered ? user.notifications.sendChargingStationRegistered : false,
- sendOcpiPatchStatusError: user.notifications.sendOcpiPatchStatusError ? user.notifications.sendOcpiPatchStatusError : false,
- sendSmtpAuthError: user.notifications.sendSmtpAuthError ? user.notifications.sendSmtpAuthError : false,
- sendOfflineChargingStations: user.notifications.sendOfflineChargingStations ? user.notifications.sendOfflineChargingStations : false,
- sendBillingSynchronizationFailed: user.notifications.sendBillingSynchronizationFailed ? user.notifications.sendBillingSynchronizationFailed : false,
- sendCarCatalogSynchronizationFailed: user.notifications.sendCarCatalogSynchronizationFailed ? user.notifications.sendCarCatalogSynchronizationFailed : false,
- sendEndUserErrorNotification: user.notifications.sendEndUserErrorNotification ? user.notifications.sendEndUserErrorNotification : false,
+ sendSessionStarted: user.notifications?.sendSessionStarted ? user.notifications.sendSessionStarted : false,
+ sendOptimalChargeReached: user.notifications?.sendOptimalChargeReached ? user.notifications.sendOptimalChargeReached : false,
+ sendEndOfCharge: user.notifications?.sendEndOfCharge ? user.notifications.sendEndOfCharge : false,
+ sendEndOfSession: user.notifications?.sendEndOfSession ? user.notifications.sendEndOfSession : false,
+ sendUserAccountStatusChanged: user.notifications?.sendUserAccountStatusChanged ? user.notifications.sendUserAccountStatusChanged : false,
+ sendSessionNotStarted: user.notifications?.sendSessionNotStarted ? user.notifications.sendSessionNotStarted : false,
+ sendUserAccountInactivity: user.notifications?.sendUserAccountInactivity ? user.notifications.sendUserAccountInactivity : false,
+ sendPreparingSessionNotStarted: user.notifications?.sendPreparingSessionNotStarted ? user.notifications.sendPreparingSessionNotStarted : false,
+ sendNewRegisteredUser: user.notifications?.sendNewRegisteredUser ? user.notifications.sendNewRegisteredUser : false,
+ sendUnknownUserBadged: user.notifications?.sendUnknownUserBadged ? user.notifications.sendUnknownUserBadged : false,
+ sendChargingStationStatusError: user.notifications?.sendChargingStationStatusError ? user.notifications.sendChargingStationStatusError : false,
+ sendChargingStationRegistered: user.notifications?.sendChargingStationRegistered ? user.notifications.sendChargingStationRegistered : false,
+ sendOcpiPatchStatusError: user.notifications?.sendOcpiPatchStatusError ? user.notifications.sendOcpiPatchStatusError : false,
+ sendSmtpAuthError: user.notifications?.sendSmtpAuthError ? user.notifications.sendSmtpAuthError : false,
+ sendOfflineChargingStations: user.notifications?.sendOfflineChargingStations ? user.notifications.sendOfflineChargingStations : false,
+ sendBillingSynchronizationFailed: user.notifications?.sendBillingSynchronizationFailed ? user.notifications.sendBillingSynchronizationFailed : false,
+ sendCarCatalogSynchronizationFailed: user.notifications?.sendCarCatalogSynchronizationFailed ? user.notifications.sendCarCatalogSynchronizationFailed : false,
+ sendEndUserErrorNotification: user.notifications?.sendEndUserErrorNotification ? user.notifications.sendEndUserErrorNotification : false,
};
// Add new prop
if (user.role === UserRole.ADMIN) {

MODIFY
src/utils/Logging.ts
src/utils/Logging.ts
@@ -211,7 +211,7 @@ export default class Logging {
// Compute Length
let contentLengthKB = 0;
if (res.getHeader('content-length')) {
- contentLengthKB = res.getHeader('content-length') as number / 1000;
+ contentLengthKB = res.getHeader('content-length') as number / 1024;
}
Logging.logSecurityDebug({
tenantID: tenantID,

Report fix from PR