Clearer video creation from API regarding rates

pull/5067/head
Chocobozzz 2022-06-08 15:42:09 +02:00
parent 1a99dc647f
commit b89b0bfce9
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 1 additions and 3 deletions

View File

@ -24,7 +24,7 @@ export class APVideoCreator extends APVideoAbstractBuilder {
const channel = channelActor.VideoChannel
const videoData = getVideoAttributesFromObject(channel, this.videoObject, this.videoObject.to)
const video = VideoModel.build(videoData) as MVideoThumbnail
const video = VideoModel.build({ ...videoData, likes: 0, dislikes: 0 }) as MVideoThumbnail
const promiseThumbnail = this.tryToGenerateThumbnail(video)

View File

@ -210,8 +210,6 @@ function getVideoAttributesFromObject (videoChannel: MChannelId, videoObject: Vi
updatedAt: new Date(videoObject.updated),
views: videoObject.views,
likes: 0,
dislikes: 0,
remote: true,
privacy
}