aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core/plugins/hooks.service.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/core/plugins/hooks.service.ts')
-rw-r--r--client/src/app/core/plugins/hooks.service.ts3
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'
2import { mergeMap, switchMap } from 'rxjs/operators' 2import { mergeMap, switchMap } from 'rxjs/operators'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { PluginService } from '@app/core/plugins/plugin.service' 4import { PluginService } from '@app/core/plugins/plugin.service'
5import { logger } from '@root-helpers/logger'
5import { ClientActionHookName, ClientFilterHookName, PluginClientScope } from '@shared/models' 6import { ClientActionHookName, ClientFilterHookName, PluginClientScope } from '@shared/models'
6import { AuthService, AuthStatus } from '../auth' 7import { 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) {