From 22df69fdecf299c8be6acaa25f086249ea9a0085 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 2 Aug 2022 15:29:00 +0200 Subject: Add job queue hooks --- server/lib/plugins/plugin-helpers-builder.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'server/lib/plugins/plugin-helpers-builder.ts') 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) { function buildUserHelpers () { return { + loadById: (id: number) => { + return UserModel.loadByIdFull(id) + }, + getAuthUser: (res: express.Response) => { const user = res.locals.oauth?.token?.User if (!user) return undefined -- cgit v1.2.3