diff options
Diffstat (limited to 'client/src/app/core/plugins')
-rw-r--r-- | client/src/app/core/plugins/hooks.service.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/app/core/plugins/hooks.service.ts b/client/src/app/core/plugins/hooks.service.ts index 062083fd1..7fd56d92e 100644 --- a/client/src/app/core/plugins/hooks.service.ts +++ b/client/src/app/core/plugins/hooks.service.ts | |||
@@ -2,6 +2,7 @@ import { from, Observable } from 'rxjs' | |||
2 | import { mergeMap, switchMap } from 'rxjs/operators' | 2 | import { mergeMap, switchMap } from 'rxjs/operators' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { PluginService } from '@app/core/plugins/plugin.service' | 4 | import { PluginService } from '@app/core/plugins/plugin.service' |
5 | import { logger } from '@root-helpers/logger' | ||
5 | import { ClientActionHookName, ClientFilterHookName, PluginClientScope } from '@shared/models' | 6 | import { ClientActionHookName, ClientFilterHookName, PluginClientScope } from '@shared/models' |
6 | import { AuthService, AuthStatus } from '../auth' | 7 | import { AuthService, AuthStatus } from '../auth' |
7 | 8 | ||
@@ -50,7 +51,7 @@ export class HooksService { | |||
50 | runAction<T, U extends ClientActionHookName> (hookName: U, scope: PluginClientScope, params?: T) { | 51 | runAction<T, U extends ClientActionHookName> (hookName: U, scope: PluginClientScope, params?: T) { |
51 | this.pluginService.ensurePluginsAreLoaded(scope) | 52 | this.pluginService.ensurePluginsAreLoaded(scope) |
52 | .then(() => this.pluginService.runHook(hookName, undefined, params)) | 53 | .then(() => this.pluginService.runHook(hookName, undefined, params)) |
53 | .catch((err: any) => console.error('Fatal hook error.', { err })) | 54 | .catch((err: any) => logger.error('Fatal hook error.', err)) |
54 | } | 55 | } |
55 | 56 | ||
56 | async wrapObject<T, U extends ClientFilterHookName> (result: T, scope: PluginClientScope, hookName: U) { | 57 | async wrapObject<T, U extends ClientFilterHookName> (result: T, scope: PluginClientScope, hookName: U) { |