Add visualID to unknown tag creattion
MODIFY
src/authorization/Authorizations.ts
src/authorization/Authorizations.ts
@@ -10,6 +10,7 @@ import Configuration from '../utils/Configuration';
import Constants from '../utils/Constants';
import CpoOCPIClient from '../client/ocpi/CpoOCPIClient';
import CpoOICPClient from '../client/oicp/CpoOICPClient';
+import Cypher from '../utils/Cypher';
import Logging from '../utils/Logging';
import NotificationHandler from '../notification/NotificationHandler';
import OCPIClientFactory from '../client/ocpi/OCPIClientFactory';
@@ -876,6 +877,7 @@ export default class Authorizations {
// Create the tag as inactive
tag = {
id: tagID,
+ visualID: Cypher.hash(tagID),
description: `Badged on '${chargingStation.id}'`,
issuer: true,
active: false,

MODIFY
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/OCPIUtilsService.ts
src/server/ocpi/ocpi-services-impl/ocpi-2.1.1/OCPIUtilsService.ts
@@ -18,6 +18,7 @@ import Configuration from '../../../../utils/Configuration';
import Constants from '../../../../utils/Constants';
import Consumption from '../../../../types/Consumption';
import ConsumptionStorage from '../../../../storage/mongodb/ConsumptionStorage';
+import Cypher from '../../../../utils/Cypher';
import { DataResult } from '../../../../types/DataResult';
import DbParams from '../../../../types/database/DbParams';
import { HTTPError } from '../../../../types/HTTPError';
@@ -625,6 +626,7 @@ export default class OCPIUtilsService {
}
const tagToSave = {
id: token.uid,
+ visualID: Cypher.hash(token.uid),
issuer: false,
userID: emspUser.id,
active: token.valid === true ? true : false,
@@ -665,6 +667,7 @@ export default class OCPIUtilsService {
await UserStorage.saveUserStatus(tenantId, emspUser.id, UserStatus.ACTIVE);
const tagToSave = {
id: token.uid,
+ visualID: Cypher.hash(token.uid),
issuer: false,
userID: emspUser.id,
active: token.valid === true ? true : false,

Add visualID to unknown tag creattion