diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-02 15:29:00 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-02 15:50:05 +0200 |
commit | 22df69fdecf299c8be6acaa25f086249ea9a0085 (patch) | |
tree | e8c7e21c18fb42bb74b54f2eab1509c3d93a380d /server/lib/plugins/plugin-helpers-builder.ts | |
parent | 7a9e420a02434e4f16c99e7d58da9075dff25d15 (diff) | |
download | PeerTube-22df69fdecf299c8be6acaa25f086249ea9a0085.tar.gz PeerTube-22df69fdecf299c8be6acaa25f086249ea9a0085.tar.zst PeerTube-22df69fdecf299c8be6acaa25f086249ea9a0085.zip |
Add job queue hooks
Diffstat (limited to 'server/lib/plugins/plugin-helpers-builder.ts')
-rw-r--r-- | server/lib/plugins/plugin-helpers-builder.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/lib/plugins/plugin-helpers-builder.ts b/server/lib/plugins/plugin-helpers-builder.ts index b76c0a8a4..4e799b3d4 100644 --- a/server/lib/plugins/plugin-helpers-builder.ts +++ b/server/lib/plugins/plugin-helpers-builder.ts | |||
@@ -220,6 +220,10 @@ function buildPluginRelatedHelpers (plugin: MPlugin, npmName: string) { | |||
220 | 220 | ||
221 | function buildUserHelpers () { | 221 | function buildUserHelpers () { |
222 | return { | 222 | return { |
223 | loadById: (id: number) => { | ||
224 | return UserModel.loadByIdFull(id) | ||
225 | }, | ||
226 | |||
223 | getAuthUser: (res: express.Response) => { | 227 | getAuthUser: (res: express.Response) => { |
224 | const user = res.locals.oauth?.token?.User | 228 | const user = res.locals.oauth?.token?.User |
225 | if (!user) return undefined | 229 | if (!user) return undefined |