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

Server: add updatedAt attribute to videos

This commit is contained in:
Chocobozzz 2016-12-30 11:45:00 +01:00
parent 3d118fb501
commit 79066fdf33
6 changed files with 26 additions and 5 deletions

View file

@ -98,7 +98,8 @@ function addRemoteVideo (videoToCreateData, fromPod, finalCallback) {
description: videoToCreateData.description,
authorId: author.id,
duration: videoToCreateData.duration,
createdAt: videoToCreateData.createdAt
createdAt: videoToCreateData.createdAt,
updatedAt: videoToCreateData.updatedAt
}
const video = db.Video.build(videoData)
@ -190,6 +191,7 @@ function updateRemoteVideo (videoAttributesToUpdate, fromPod, finalCallback) {
videoInstance.set('infoHash', videoAttributesToUpdate.infoHash)
videoInstance.set('duration', videoAttributesToUpdate.duration)
videoInstance.set('createdAt', videoAttributesToUpdate.createdAt)
videoInstance.set('updatedAt', videoAttributesToUpdate.updatedAt)
videoInstance.set('extname', videoAttributesToUpdate.extname)
videoInstance.save(options).asCallback(function (err) {