Add withChargingStation to getTransaction()
MODIFY
src/storage/mongodb/TransactionStorage.ts
src/storage/mongodb/TransactionStorage.ts
@@ -1095,11 +1095,12 @@ export default class TransactionStorage {
}
public static async getTransaction(tenantID: string, id: number = Constants.UNKNOWN_NUMBER_ID,
- params: { withTag?: boolean; withCar?: boolean; withUser?: boolean } = {}, projectFields?: string[]): Promise<Transaction> {
+ params: { withTag?: boolean; withCar?: boolean; withUser?: boolean; withChargingStation?: boolean; } = {}, projectFields?: string[]): Promise<Transaction> {
const transactionsMDB = await TransactionStorage.getTransactions(tenantID, {
transactionIDs: [id],
withTag: params.withTag,
withCar: params.withCar,
+ withChargingStation: params.withChargingStation,
withUser: params.withUser,
}, Constants.DB_PARAMS_SINGLE_RECORD, projectFields);
return transactionsMDB.count === 1 ? transactionsMDB.result[0] : null;

Add withChargingStation to getTransaction()