mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Optimize SQL requests of videos AP endpoints
This commit is contained in:
parent
ad76628b17
commit
96f29c0f6d
7 changed files with 56 additions and 44 deletions
|
@ -112,12 +112,13 @@ function videoModelToFormattedDetailsJSON (video: VideoModel): VideoDetails {
|
|||
}
|
||||
})
|
||||
|
||||
const tags = video.Tags ? video.Tags.map(t => t.name) : []
|
||||
const detailsJson = {
|
||||
support: video.support,
|
||||
descriptionPath: video.getDescriptionPath(),
|
||||
descriptionPath: video.getDescriptionAPIPath(),
|
||||
channel: video.VideoChannel.toFormattedJSON(),
|
||||
account: video.VideoChannel.Account.toFormattedJSON(),
|
||||
tags: video.Tags.map(t => t.name),
|
||||
tags,
|
||||
commentsEnabled: video.commentsEnabled,
|
||||
waitTranscoding: video.waitTranscoding,
|
||||
state: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue