repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switch log messages to string literal
[e-mobility-charging-stations-simulator.git]
/
src
/
charging-station
/
AuthorizedTagsCache.ts
diff --git
a/src/charging-station/AuthorizedTagsCache.ts
b/src/charging-station/AuthorizedTagsCache.ts
index d39fbee61e6fa6e27a13fbddbab25dbdffee2d06..4f853a971fc537fe35f872fbeaf6f2075a50e830 100644
(file)
--- a/
src/charging-station/AuthorizedTagsCache.ts
+++ b/
src/charging-station/AuthorizedTagsCache.ts
@@
-23,10
+23,10
@@
export default class AuthorizedTagsCache {
}
public getAuthorizedTags(file: string): string[] {
}
public getAuthorizedTags(file: string): string[] {
- if (
!this.hasTags(file)
) {
+ if (
this.hasTags(file) === false
) {
this.setTags(file, this.getAuthorizedTagsFromFile(file));
// Monitor authorization file
this.setTags(file, this.getAuthorizedTagsFromFile(file));
// Monitor authorization file
-
!this.FSWatchers.has(file)
&&
+
this.FSWatchers.has(file) === false
&&
this.FSWatchers.set(
file,
FileUtils.watchJsonFile(
this.FSWatchers.set(
file,
FileUtils.watchJsonFile(
@@
-38,10
+38,7
@@
export default class AuthorizedTagsCache {
if (filename && event === 'change') {
try {
logger.debug(
if (filename && event === 'change') {
try {
logger.debug(
- this.logPrefix(file) +
- ' ' +
- FileType.Authorization +
- ' file have changed, reload'
+ `${this.logPrefix(file)} ${FileType.Authorization} file have changed, reload`
);
this.deleteTags(file);
this.deleteFSWatcher(file);
);
this.deleteTags(file);
this.deleteFSWatcher(file);
@@
-64,6
+61,10
@@
export default class AuthorizedTagsCache {
return this.getTags(file);
}
return this.getTags(file);
}
+ public deleteAuthorizedTags(file: string): boolean {
+ return this.deleteTags(file);
+ }
+
private hasTags(file: string): boolean {
return this.tagsCaches.has(file);
}
private hasTags(file: string): boolean {
return this.tagsCaches.has(file);
}
@@
-100,7
+101,7
@@
export default class AuthorizedTagsCache {
);
}
} else {
);
}
} else {
- logger.info(
this.logPrefix(file) + ' No authorization file given)'
);
+ logger.info(
`${this.logPrefix(file)} No authorization file given`
);
}
return authorizedTags;
}
}
return authorizedTags;
}