Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Fixed Authorize token not passed for Gireve
Browse files Browse the repository at this point in the history
Fixed action in Axios error logs
  • Loading branch information
LucasBrazi06 committed Apr 15, 2022
1 parent 6b31d39 commit fa25331
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/client/ocpi/CpoOCPIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ export default class CpoOCPIClient extends OCPIClient {
id: transaction.id.toString(),
start_datetime: transaction.timestamp,
kwh: 0,
authorization_id: transaction.authorizationID,
auth_method: OCPIAuthMethod.AUTH_REQUEST,
auth_id: ocpiToken.auth_id,
location: ocpiLocation,
Expand Down Expand Up @@ -398,6 +399,7 @@ export default class CpoOCPIClient extends OCPIClient {
auth_id: transaction.ocpiData.session.auth_id,
auth_method: transaction.ocpiData.session.auth_method,
location: transaction.ocpiData.session.location,
authorization_id: transaction.ocpiData.session.authorization_id,
total_cost: transaction.stop.roundedPrice > 0 ? transaction.stop.roundedPrice : 0,
charging_periods: await this.buildChargingPeriods(this.tenant, transaction),
last_updated: transaction.stop.timestamp
Expand Down
1 change: 1 addition & 0 deletions src/types/ocpi/OCPISession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export interface OCPISession {
id: string;
start_datetime: Date;
end_datetime?: Date;
authorization_id?: string;
kwh: number;
auth_id: string;
auth_method: OCPIAuthMethod;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ export default class Logging {
// Error handling is done outside to get the proper module information
await Logging.logError({
tenantID: tenant.id,
action: ServerAction.HTTP_ERROR,
action: Utils.getAxiosActionFromURL(error.config.url),
message: `Axios HTTP Error >> ${error.config?.method?.toLocaleUpperCase()}/${error.response?.status} '${error.config?.url}' - ${error.message}`,
module: Constants.MODULE_AXIOS, method: 'interceptor',
detailedMessages: {
Expand Down

0 comments on commit fa25331

Please sign in to comment.