1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Change models

This commit is contained in:
clementbrizard 2019-01-12 13:41:45 +00:00
parent 94a680c095
commit c80341655f
8 changed files with 26 additions and 1 deletions

View file

@ -60,6 +60,7 @@ function videoModelToFormattedJSON (video: VideoModel, options?: VideoFormatting
createdAt: video.createdAt,
updatedAt: video.updatedAt,
publishedAt: video.publishedAt,
originallyPublishedAt: video.originallyPublishedAt,
account: {
id: formattedAccount.id,
uuid: formattedAccount.uuid,
@ -264,6 +265,9 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
state: video.state,
commentsEnabled: video.commentsEnabled,
published: video.publishedAt.toISOString(),
originallyPublishedAt: video.originallyPublishedAt ?
video.originallyPublishedAt.toISOString() :
null,
updated: video.updatedAt.toISOString(),
mediaType: 'text/markdown',
content: video.getTruncatedDescription(),