mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Add job queue hooks
This commit is contained in:
parent
7a9e420a02
commit
22df69fdec
12 changed files with 151 additions and 26 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue