aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index 7c56c65a6..2a1226f6d 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -376,6 +376,11 @@ export class VideoModel extends Model<VideoModel> {
376 @UpdatedAt 376 @UpdatedAt
377 updatedAt: Date 377 updatedAt: Date
378 378
379 @AllowNull(false)
380 @Default(Sequelize.NOW)
381 @Column
382 publishedAt: Date
383
379 @ForeignKey(() => VideoChannelModel) 384 @ForeignKey(() => VideoChannelModel)
380 @Column 385 @Column
381 channelId: number 386 channelId: number
@@ -968,6 +973,7 @@ export class VideoModel extends Model<VideoModel> {
968 embedPath: this.getEmbedPath(), 973 embedPath: this.getEmbedPath(),
969 createdAt: this.createdAt, 974 createdAt: this.createdAt,
970 updatedAt: this.updatedAt, 975 updatedAt: this.updatedAt,
976 publishedAt: this.publishedAt,
971 account: { 977 account: {
972 name: formattedAccount.name, 978 name: formattedAccount.name,
973 displayName: formattedAccount.displayName, 979 displayName: formattedAccount.displayName,
@@ -1122,7 +1128,7 @@ export class VideoModel extends Model<VideoModel> {
1122 views: this.views, 1128 views: this.views,
1123 sensitive: this.nsfw, 1129 sensitive: this.nsfw,
1124 commentsEnabled: this.commentsEnabled, 1130 commentsEnabled: this.commentsEnabled,
1125 published: this.createdAt.toISOString(), 1131 published: this.publishedAt.toISOString(),
1126 updated: this.updatedAt.toISOString(), 1132 updated: this.updatedAt.toISOString(),
1127 mediaType: 'text/markdown', 1133 mediaType: 'text/markdown',
1128 content: this.getTruncatedDescription(), 1134 content: this.getTruncatedDescription(),