]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/remote.js
Server: fix video remoe validation
[github/Chocobozzz/PeerTube.git] / server / controllers / api / remote.js
index 254ae56d52b0fb63a075ba2b6276755c4bc78c89..be5e6dc98e99e16dd82459e7eddc5387bb42e57f 100644 (file)
@@ -1,6 +1,5 @@
 'use strict'
 
-const each = require('async/each')
 const eachSeries = require('async/eachSeries')
 const express = require('express')
 const waterfall = require('async/waterfall')
@@ -98,7 +97,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 +190,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) {