aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/types/plugins
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-22 10:55:28 +0200
committerChocobozzz <me@florianbigard.com>2021-04-22 10:55:28 +0200
commit302eba0d898e38dca14739486441c27c0be6c62f (patch)
tree280d18bfe2ad1b16248277371e609c31d6b3aaa4 /server/types/plugins
parent3e0e8d4afded28559b7c473061bbdc31ab542e1c (diff)
downloadPeerTube-302eba0d898e38dca14739486441c27c0be6c62f.tar.gz
PeerTube-302eba0d898e38dca14739486441c27c0be6c62f.tar.zst
PeerTube-302eba0d898e38dca14739486441c27c0be6c62f.zip
Add data directory for plugins and some helpers
Diffstat (limited to 'server/types/plugins')
-rw-r--r--server/types/plugins/register-server-option.model.ts17
1 files changed, 16 insertions, 1 deletions
diff --git a/server/types/plugins/register-server-option.model.ts b/server/types/plugins/register-server-option.model.ts
index 391dcc3f9..1b9250ce4 100644
--- a/server/types/plugins/register-server-option.model.ts
+++ b/server/types/plugins/register-server-option.model.ts
@@ -1,4 +1,4 @@
1import { Router } from 'express' 1import { Router, Response } from 'express'
2import { Logger } from 'winston' 2import { Logger } from 'winston'
3import { ActorModel } from '@server/models/activitypub/actor' 3import { ActorModel } from '@server/models/activitypub/actor'
4import { 4import {
@@ -13,6 +13,7 @@ import {
13 RegisterServerHookOptions, 13 RegisterServerHookOptions,
14 RegisterServerSettingOptions, 14 RegisterServerSettingOptions,
15 ServerConfig, 15 ServerConfig,
16 UserRole,
16 VideoBlacklistCreate 17 VideoBlacklistCreate
17} from '@shared/models' 18} from '@shared/models'
18import { MVideoThumbnail } from '../models' 19import { MVideoThumbnail } from '../models'
@@ -58,6 +59,20 @@ export type PeerTubeHelpers = {
58 59
59 plugin: { 60 plugin: {
60 getBaseStaticRoute: () => string 61 getBaseStaticRoute: () => string
62
63 getBaseRouterRoute: () => string
64
65 getDataDirectoryPath: () => string
66 }
67
68 user: {
69 getAuthUser: (response: Response) => {
70 id?: string
71 username: string
72 email: string
73 blocked: boolean
74 role: UserRole
75 } | undefined
61 } 76 }
62} 77}
63 78