Switch to rollup-plugin-typescript2 plugin
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStation.ts
index 0c39613beefea49afdb1a3701457daba98fa12ee..da43ad2f5a960fc7d388ac54689a543c09829b90 100644 (file)
@@ -29,6 +29,7 @@ import { WebSocketCloseEventStatusCode } from '../types/WebSocket';
 import crypto from 'crypto';
 import fs from 'fs';
 import logger from '../utils/Logger';
+import path from 'path';
 
 export default class ChargingStation {
   public stationTemplateFile: string;
@@ -598,12 +599,13 @@ export default class ChargingStation {
   }
 
   private getAuthorizationFile(): string {
-    return this.stationInfo.authorizationFile && this.stationInfo.authorizationFile;
+    return this.stationInfo.authorizationFile && path.join(path.resolve(__dirname, '../'), 'assets', this.stationInfo.authorizationFile);
   }
 
   private getAuthorizedTags(): string[] {
     let authorizedTags: string[] = [];
     const authorizationFile = this.getAuthorizationFile();
+    console.log(authorizationFile);
     if (authorizationFile) {
       try {
         // Load authorization file