Start transaction with visualID
MODIFY
src/assets/server/rest/v1/schemas/chargingstation/chargingstation-action.json
src/assets/server/rest/v1/schemas/chargingstation/chargingstation-action.json
"type": "string",
"sanitize": "mongo"
},
+ "userID": {
+ "$ref": "common.json#/definitions/id"
+ },
"location": {
"type": "string",
"sanitize": "mongo"

MODIFY
src/server/rest/v1/service/ChargingStationService.ts
src/server/rest/v1/service/ChargingStationService.ts
@@ -1275,7 +1275,7 @@ export default class ChargingStationService {
}
// Site -----------------------------------------------------
chargingStation.siteArea.site = chargingStation.siteArea.site ??
- (chargingStation.siteArea.siteID ? await SiteStorage.getSite(req.tenant.id, chargingStation.siteArea.siteID) : null);
+ (chargingStation.siteArea.siteID ? await SiteStorage.getSite(req.tenant, chargingStation.siteArea.siteID) : null);
if (!chargingStation.siteArea.site) {
// Reject Site Not Found
throw new BackendError({

MODIFY
src/server/rest/v1/service/UserService.ts
src/server/rest/v1/service/UserService.ts
@@ -59,16 +59,12 @@ export default class UserService {
// Get the default Tag
let tag = await TagStorage.getDefaultUserTag(req.user.tenantID, user.id, {
issuer: true
- }, ['id']);
+ }, ['visualID', 'description', 'active']);
if (!tag) {
// Get the first active Tag
tag = await TagStorage.getFirstActiveUserTag(req.user.tenantID, user.id, {
issuer: true
- }, ['id']);
- }
- if (tag) {
- tag = await UtilsService.checkAndGetTagAuthorization(req.tenant, req.user, tag.id, Action.READ, action,
- { withUser: false }, true);
+ }, ['visualID', 'description', 'active']);
}
// Handle Car
let car: Car;

Start transaction with visualID