Add issuer in company service
MODIFY
src/server/rest/v1/service/ChargingStationService.ts
src/server/rest/v1/service/ChargingStationService.ts
@@ -713,7 +713,6 @@ export default class ChargingStationService {
public static async handleGetChargingStation(action: ServerAction, req: Request, res: Response, next: NextFunction): Promise<void> {
// Filter
const filteredRequest = ChargingStationSecurity.filterChargingStationRequest(req.query);
- // Check
UtilsService.assertIdIsProvided(action, filteredRequest.ID, MODULE_NAME, 'handleGetChargingStation', req.user);
// Check auth
if (!Authorizations.canReadChargingStation(req.user)) {
@@ -729,7 +728,6 @@ export default class ChargingStationService {
}
// Query charging station
const chargingStation = await ChargingStationStorage.getChargingStation(req.user.tenantID, filteredRequest.ID);
- // Check
UtilsService.assertObjectExists(action, chargingStation, `Charging Station '${filteredRequest.ID}' does not exist`,
MODULE_NAME, 'handleGetChargingStation', req.user);
// Deleted?

MODIFY
src/server/rest/v1/service/security/CompanySecurity.ts
src/server/rest/v1/service/security/CompanySecurity.ts
@@ -78,6 +78,7 @@ export default class CompanySecurity {
filteredCompany = {};
filteredCompany.id = company.id;
filteredCompany.name = company.name;
+ filteredCompany.issuer = company.issuer;
filteredCompany.logo = company.logo;
filteredCompany.address = UtilsSecurity.filterAddressRequest(company.address);
if (company.sites) {
@@ -96,7 +97,6 @@ export default class CompanySecurity {
public static filterCompaniesResponse(companies: DataResult<Company>, loggedUser: UserToken): void {
const filteredCompanies = [];
-
if (!companies.result) {
return null;
}

Add issuer in company service