import { sequelizeTypescript } from '@server/initializers/database'
import { buildLogger } from '@server/helpers/logger'
import { VideoModel } from '@server/models/video/video'
+import { WEBSERVER } from '@server/initializers/constants'
function buildPluginHelpers (npmName: string): PeerTubeHelpers {
const logger = buildPluginLogger(npmName)
const database = buildDatabaseHelpers()
const videos = buildVideosHelpers()
+ const config = buildConfigHelpers()
+
return {
logger,
database,
- videos
+ videos,
+ config
}
}
}
}
}
+
+function buildConfigHelpers () {
+ return {
+ getWebserverUrl () {
+ return WEBSERVER.URL
+ }
+ }
+}