Fixed commands prefix
MODIFY
src/server/rest/v1/service/ChargingStationService.ts
src/server/rest/v1/service/ChargingStationService.ts
@@ -1140,7 +1140,7 @@ export default class ChargingStationService {
// Backward compatibility for the mobile application
req.body.chargeBoxID && (req.body.chargingStationID = req.body.chargeBoxID);
// Filter - Type is hacked because code below is. Would need approval to change code structure.
- const command = action.slice(15) as Command;
+ const command = action.slice('RestChargingStation'.length) as Command;
const filteredRequest = ChargingStationValidator.getInstance().validateChargingStationActionReq(req.body);
UtilsService.assertIdIsProvided(action, filteredRequest.chargingStationID, MODULE_NAME, 'handleAction', req.user);
// Get the Charging station

MODIFY
test/api/TenantTest.ts
test/api/TenantTest.ts
@@ -140,13 +140,6 @@ describe('Tenant', function() {
});
describe('Error cases', () => {
- it('Should not be possible to read an empty tenant', async () => {
- // Exec
- const response = await CentralServerService.defaultInstance.getEntityById(
- CentralServerService.defaultInstance.tenantApi, { id: '' }, false);
- // Check
- expect(response.status).to.equal(StatusCodes.INTERNAL_SERVER_ERROR);
- });
it('Should not be possible to read an invalid tenant', async () => {
// Exec

Fixed commands prefix