diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-12-30 11:45:00 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-12-30 11:45:00 +0100 |
commit | 79066fdf33f79d2d41394f10881e2c226ca26b49 (patch) | |
tree | 4e7356b1e0d56dd64dfe2039ca97326560495809 /server/controllers/api | |
parent | 3d118fb501f576a298f6bb059167e4c7f4dd8dcc (diff) | |
download | PeerTube-79066fdf33f79d2d41394f10881e2c226ca26b49.tar.gz PeerTube-79066fdf33f79d2d41394f10881e2c226ca26b49.tar.zst PeerTube-79066fdf33f79d2d41394f10881e2c226ca26b49.zip |
Server: add updatedAt attribute to videos
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/remote.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/controllers/api/remote.js b/server/controllers/api/remote.js index 254ae56d5..a36c31c38 100644 --- a/server/controllers/api/remote.js +++ b/server/controllers/api/remote.js | |||
@@ -98,7 +98,8 @@ function addRemoteVideo (videoToCreateData, fromPod, finalCallback) { | |||
98 | description: videoToCreateData.description, | 98 | description: videoToCreateData.description, |
99 | authorId: author.id, | 99 | authorId: author.id, |
100 | duration: videoToCreateData.duration, | 100 | duration: videoToCreateData.duration, |
101 | createdAt: videoToCreateData.createdAt | 101 | createdAt: videoToCreateData.createdAt, |
102 | updatedAt: videoToCreateData.updatedAt | ||
102 | } | 103 | } |
103 | 104 | ||
104 | const video = db.Video.build(videoData) | 105 | const video = db.Video.build(videoData) |
@@ -190,6 +191,7 @@ function updateRemoteVideo (videoAttributesToUpdate, fromPod, finalCallback) { | |||
190 | videoInstance.set('infoHash', videoAttributesToUpdate.infoHash) | 191 | videoInstance.set('infoHash', videoAttributesToUpdate.infoHash) |
191 | videoInstance.set('duration', videoAttributesToUpdate.duration) | 192 | videoInstance.set('duration', videoAttributesToUpdate.duration) |
192 | videoInstance.set('createdAt', videoAttributesToUpdate.createdAt) | 193 | videoInstance.set('createdAt', videoAttributesToUpdate.createdAt) |
194 | videoInstance.set('updatedAt', videoAttributesToUpdate.updatedAt) | ||
193 | videoInstance.set('extname', videoAttributesToUpdate.extname) | 195 | videoInstance.set('extname', videoAttributesToUpdate.extname) |
194 | 196 | ||
195 | videoInstance.save(options).asCallback(function (err) { | 197 | videoInstance.save(options).asCallback(function (err) { |