remove user deleted flag from ocpi
MODIFY
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/OCPIUtilsService.ts
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/OCPIUtilsService.ts
@@ -151,7 +151,7 @@ export default class OCPIUtilsService {
auth_id: tag.userID,
visual_number: tag.userID,
issuer: tenant.name,
- valid: !tag.user?.deleted,
+ valid: !Utils.isNullOrUndefined(tag.user),
whitelist: OCPITokenWhitelist.ALLOWED_OFFLINE,
last_updated: tag.lastChangedOn ? tag.lastChangedOn : new Date()
});

MODIFY
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/cpo/CPOCommandsEndpoint.ts
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/cpo/CPOCommandsEndpoint.ts
@@ -103,7 +103,7 @@ export default class CPOCommandsEndpoint extends AbstractEndpoint {
});
return this.buildOCPIResponse(OCPICommandResponseType.REJECTED);
}
- if (localToken.user?.deleted || localToken.user?.issuer) {
+ if (!Utils.isNullOrUndefined(localToken.user) || localToken.user?.issuer) {
return this.buildOCPIResponse(OCPICommandResponseType.REJECTED);
}
// Get the Charging Station

remove user deleted flag from ocpi