1
0
Fork 0
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:
Chocobozzz 2024-03-12 16:00:51 +01:00
parent 0f67adf98a
commit 486b4a329f
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 16 additions and 13 deletions

View file

@ -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())
}
}