mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Optimize config endpoint
This commit is contained in:
parent
0f67adf98a
commit
486b4a329f
4 changed files with 16 additions and 13 deletions
|
@ -1,7 +1,8 @@
|
|||
import { getNodeABIVersion } from '@server/helpers/version.js'
|
||||
import memoizee from 'memoizee'
|
||||
import { AllowNull, Column, Default, DefaultScope, HasOne, IsInt, Table } from 'sequelize-typescript'
|
||||
import { getNodeABIVersion } from '@server/helpers/version.js'
|
||||
import { AccountModel } from '../account/account.js'
|
||||
import { ActorImageModel } from '../actor/actor-image.js'
|
||||
import { SequelizeModel } from '../shared/index.js'
|
||||
|
||||
export const getServerActor = memoizee(async function () {
|
||||
|
@ -11,6 +12,10 @@ export const getServerActor = memoizee(async function () {
|
|||
const actor = application.Account.Actor
|
||||
actor.Account = application.Account
|
||||
|
||||
const { avatars, banners } = await ActorImageModel.listActorImages(actor)
|
||||
actor.Avatars = avatars
|
||||
actor.Banners = banners
|
||||
|
||||
return actor
|
||||
}, { promise: true })
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue