mirror of
https://github.com/unraid/api.git
synced 2025-12-31 13:39:52 -06:00
fix: watch all events to load keys
This commit is contained in:
@@ -47,7 +47,7 @@ export class ApiKeyService implements OnModuleInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private setupWatch() {
|
private setupWatch() {
|
||||||
watch(this.basePath, { ignoreInitial: false }).on('change', async (path) => {
|
watch(this.basePath, { ignoreInitial: false }).on('all', async (path) => {
|
||||||
this.logger.debug(`API key changed: ${path}`);
|
this.logger.debug(`API key changed: ${path}`);
|
||||||
this.memoryApiKeys = [];
|
this.memoryApiKeys = [];
|
||||||
this.memoryApiKeys = await this.loadAllFromDisk();
|
this.memoryApiKeys = await this.loadAllFromDisk();
|
||||||
|
|||||||
Reference in New Issue
Block a user