Adding some more missing file changes.
MODIFY
src/authorization/Authorizations.ts
src/authorization/Authorizations.ts
@@ -1071,7 +1071,7 @@ export default class Authorizations {
}
// Site -----------------------------------------------------
chargingStation.siteArea.site = chargingStation.siteArea.site ??
- (chargingStation.siteArea.siteID ? await SiteStorage.getSite(tenant.id, chargingStation.siteArea.siteID) : null);
+ (chargingStation.siteArea.siteID ? await SiteStorage.getSite(tenant, chargingStation.siteArea.siteID) : null);
if (!chargingStation.siteArea.site) {
// Reject Site Not Found
throw new BackendError({

MODIFY
src/client/oicp/CpoOICPClient.ts
src/client/oicp/CpoOICPClient.ts
@@ -60,7 +60,7 @@ export default class CpoOICPClient extends OICPClient {
// Get Site Area
const siteArea = chargingStation.siteArea;
// Get Site
- const site = await SiteStorage.getSite(this.tenant.id, chargingStation.siteID);
+ const site = await SiteStorage.getSite(this.tenant, chargingStation.siteID);
// Get Evse
const oicpEvse = OICPUtils.getEvseByConnectorId(
site, siteArea, chargingStation, transaction.connectorId, options);
@@ -201,7 +201,7 @@ export default class CpoOICPClient extends OICPClient {
let currentSiteSkip = 0;
do {
// Get the public Sites
- sites = (await SiteStorage.getSites(this.tenant.id,
+ sites = (await SiteStorage.getSites(this.tenant,
{ public: true }, { skip: currentSiteSkip, limit: Constants.DB_RECORD_COUNT_DEFAULT })).result;
if (!Utils.isEmptyArray(sites)) {
for (const site of sites) {
@@ -349,7 +349,7 @@ export default class CpoOICPClient extends OICPClient {
let currentSiteSkip = 0;
do {
// Get the public Sites
- sites = (await SiteStorage.getSites(this.tenant.id,
+ sites = (await SiteStorage.getSites(this.tenant,
{ public: true }, { skip: currentSiteSkip, limit: Constants.DB_RECORD_COUNT_DEFAULT })).result;
if (!Utils.isEmptyArray(sites)) {
for (const site of sites) {

MODIFY
src/server/rest/v1/service/ChargingStationService.ts
src/server/rest/v1/service/ChargingStationService.ts
@@ -141,7 +141,7 @@ export default class ChargingStationService {
partyID: oicpClient.getLocalPartyID(ServerAction.OICP_PUSH_EVSE_DATA)
};
// Get Site
- const site = await SiteStorage.getSite(req.tenant.id, chargingStation.siteID);
+ const site = await SiteStorage.getSite(req.tenant, chargingStation.siteID);
// Push EVSE to OICP platform
await oicpClient.pushEvseData(OICPUtils.convertChargingStation2MultipleEvses(
site, chargingStation.siteArea, chargingStation, options), actionType);
@@ -848,7 +848,7 @@ export default class ChargingStationService {
partyID: oicpClient.getLocalPartyID(ServerAction.OICP_PUSH_EVSE_DATA)
};
// Get Site
- const site = await SiteStorage.getSite(req.tenant.id, chargingStation.siteID);
+ const site = await SiteStorage.getSite(req.tenant, chargingStation.siteID);
// Push EVSE to OICP platform
await oicpClient.pushEvseData(OICPUtils.convertChargingStation2MultipleEvses(
site, chargingStation.siteArea, chargingStation, options), OICPActionType.DELETE);

Adding some more missing file changes.