mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Add job queue hooks
This commit is contained in:
parent
7a9e420a02
commit
22df69fdec
12 changed files with 151 additions and 26 deletions
|
@ -8,8 +8,8 @@ type RawFunction <U, T> = (params: U) => T
|
|||
|
||||
// Helpers to run hooks
|
||||
const Hooks = {
|
||||
wrapObject: <T, U extends ServerFilterHookName>(result: T, hookName: U) => {
|
||||
return PluginManager.Instance.runHook(hookName, result)
|
||||
wrapObject: <T, U extends ServerFilterHookName>(result: T, hookName: U, context?: any) => {
|
||||
return PluginManager.Instance.runHook(hookName, result, context)
|
||||
},
|
||||
|
||||
wrapPromiseFun: async <U, T, V extends ServerFilterHookName>(fun: PromiseFunction<U, T>, params: U, hookName: V) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue