mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Refactor plugin helpers factory
This commit is contained in:
parent
00c228363f
commit
bc0d801bb7
5 changed files with 242 additions and 169 deletions
20
server/lib/plugins/plugin-helpers.ts
Normal file
20
server/lib/plugins/plugin-helpers.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { PluginModel } from '@server/models/server/plugin'
|
||||
import { PeerTubeHelpers } from '@server/typings/plugins'
|
||||
|
||||
function buildPluginHelpers (npmName: string, plugin: PluginModel): PeerTubeHelpers {
|
||||
const logger = buildLogger(npmName)
|
||||
|
||||
return {
|
||||
logger
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
buildPluginHelpers
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
function buildLogger (npmName: string) {
|
||||
return buildLogger(npmName)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue