mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 09:49:20 +02:00
Optimize config endpoint
This commit is contained in:
parent
0f67adf98a
commit
486b4a329f
4 changed files with 16 additions and 13 deletions
|
@ -106,7 +106,7 @@ async function getConfig (req: express.Request, res: express.Response) {
|
|||
}
|
||||
|
||||
async function getAbout (req: express.Request, res: express.Response) {
|
||||
const { avatars, banners } = await ActorImageModel.listServerActorImages()
|
||||
const serverActor = await getServerActor()
|
||||
|
||||
const about: About = {
|
||||
instance: {
|
||||
|
@ -127,8 +127,8 @@ async function getAbout (req: express.Request, res: express.Response) {
|
|||
languages: CONFIG.INSTANCE.LANGUAGES,
|
||||
categories: CONFIG.INSTANCE.CATEGORIES,
|
||||
|
||||
banners: banners.map(b => b.toFormattedJSON()),
|
||||
avatars: avatars.map(a => a.toFormattedJSON())
|
||||
banners: serverActor.Banners.map(b => b.toFormattedJSON()),
|
||||
avatars: serverActor.Avatars.map(a => a.toFormattedJSON())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue