mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Add ability to change the homepage
This commit is contained in:
@@ -44,6 +44,7 @@ async function getConfig (req: express.Request, res: express.Response, next: exp
|
||||
const json: ServerConfig = {
|
||||
instance: {
|
||||
name: CONFIG.INSTANCE.NAME,
|
||||
defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE,
|
||||
customizations: {
|
||||
javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT,
|
||||
css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS
|
||||
@@ -114,7 +115,9 @@ async function updateCustomConfig (req: express.Request, res: express.Response,
|
||||
// Need to change the videoQuota key a little bit
|
||||
const toUpdateJSON = omit(toUpdate, 'videoQuota')
|
||||
toUpdateJSON.user['video_quota'] = toUpdate.user.videoQuota
|
||||
toUpdateJSON.instance['default_client_route'] = toUpdate.instance.defaultClientRoute
|
||||
delete toUpdate.user.videoQuota
|
||||
delete toUpdate.instance.defaultClientRoute
|
||||
|
||||
await writeFilePromise(CONFIG.CUSTOM_FILE, JSON.stringify(toUpdateJSON, undefined, 2))
|
||||
|
||||
@@ -138,6 +141,7 @@ function customConfig (): CustomConfig {
|
||||
name: CONFIG.INSTANCE.NAME,
|
||||
description: CONFIG.INSTANCE.DESCRIPTION,
|
||||
terms: CONFIG.INSTANCE.TERMS,
|
||||
defaultClientRoute: CONFIG.INSTANCE.DEFAULT_CLIENT_ROUTE,
|
||||
customizations: {
|
||||
css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS,
|
||||
javascript: CONFIG.INSTANCE.CUSTOMIZATIONS.JAVASCRIPT
|
||||
|
||||
Reference in New Issue
Block a user