|
@@ -375,9 +375,18 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
else
|
|
|
{
|
|
|
|
|
|
- result.StatusCode = _innerResult.ErrorCode;
|
|
|
- result.StatusMessage = CPO_StatusMessage.ERROR_MSG_INNERSERVICE_ERROR;
|
|
|
- statusCode = HttpStatusCode.BadRequest;
|
|
|
+ if (_innerResult.ErrorCode == (int)CPO_StatusCode.CHARGEBOXID_ISNT_EXIST_OR_OFFLINE)
|
|
|
+ {
|
|
|
+ result.StatusMessage = CPO_StatusMessage.ERROR_MSG_CHARGEBOXID_ISNT_EXIST_OR_OFFLINE;
|
|
|
+ result.StatusCode = (int)CPO_StatusCode.CHARGEBOXID_ISNT_EXIST_OR_OFFLINE;
|
|
|
+ statusCode = HttpStatusCode.OK;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ result.StatusCode = _innerResult.ErrorCode;
|
|
|
+ result.StatusMessage = CPO_StatusMessage.ERROR_MSG_INNERSERVICE_ERROR;
|
|
|
+ statusCode = HttpStatusCode.BadRequest;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|
|
@@ -545,7 +554,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
|
}
|
|
|
|
|
|
- [Route("commands/chargingporfiles")]
|
|
|
+ [Route("commands/chargingprofiles")]
|
|
|
[ResponseType(typeof(CPOOuterResponse))]
|
|
|
[HttpPut]
|
|
|
async public Task<HttpResponseMessage> SetChargingProfile(string ChargeBoxId, [FromBody] ChargingProfileRequest request)
|
|
@@ -630,7 +639,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
|
|
|
return Request.CreateResponse(statusCode, result);
|
|
|
}
|
|
|
|
|
|
- [Route("commands/chargingporfiles")]
|
|
|
+ [Route("commands/chargingprofiles")]
|
|
|
[ResponseType(typeof(CPOOuterResponse))]
|
|
|
[HttpDelete]
|
|
|
async public Task<HttpResponseMessage> ClearChargingPorfile(string ChargeBoxId, int ChargeProfileId = -1)
|