Enhanced search on CS and Session
MODIFY
src/storage/mongodb/ChargingStationStorage.ts
src/storage/mongodb/ChargingStationStorage.ts
@@ -175,6 +175,7 @@ export default class ChargingStationStorage {
if (params.search) {
filters.$or = [
{ _id: { $regex: params.search, $options: 'im' } },
+ { _id: params.search },
{ 'ocpiData.evses.uid': { $regex: params.search, $options: 'im' } },
{ 'ocpiData.evses.location_id': { $regex: params.search, $options: 'im' } },
{ chargePointModel: { $regex: params.search, $options: 'im' } },

MODIFY
src/storage/mongodb/TransactionStorage.ts
src/storage/mongodb/TransactionStorage.ts
@@ -371,7 +371,8 @@ export default class TransactionStorage {
{ '_id': Utils.convertToInt(params.search) },
{ 'tagID': { $regex: params.search, $options: 'i' } },
{ 'chargeBoxID': { $regex: params.search, $options: 'i' } },
- { 'ocpiData.session.authorization_id': { $regex: params.search, $options: 'i' } }
+ { 'ocpiData.session.id': params.search },
+ { 'ocpiData.session.authorization_id': params.search },
];
}
// OCPI ID

Enhanced search on CS and Session